Replies: 2 comments
-
Unfortunately this is not fully supported, you could hack around this yourself with something like this (I haven't tested, so you may need to adjust) from prisma import Prisma
client = Prisma()
client.connect()
other_client = Prisma()
other_client._internal_engine = client._internal_engine obviously this is an internal API so use it with caution |
Beta Was this translation helpful? Give feedback.
-
Not sure I managed to explain my use case here. What I'm trying to achieve is to run the Prisma rust backend on a completely separate set of machines from the machines where the code making queries run. So it's not the same process, or even the same machine (well, Kubernetes pod). The rust backend exposes a GraphQL API, so I envisioned being able to just point the code of my clients making queries to the URL of this GraphQL API in some way. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to run the Prisma rust backend separately, and pass a URL to it when initializing prisma-client-py?
My use case is that I have a rather large bunch of pods (~30-40) that make spurious prisma queries (but most of the time, they don't), and from a resource consumption perspective (CPU/memory/database connections/container size), it would make sense to only run a few (2-3) rust backends that connect to the actual database.
I understand that prisma schemas would need to be kept up to date in both ends.
Can this be done? How?
Beta Was this translation helpful? Give feedback.
All reactions