Hey guys! What are the benefits of adding Data Pro...
# prisma-data-platform
v
Hey guys! What are the benefits of adding Data Proxy if you use PlanetScale? They seem to cover connection pooling as well?
a
v
Thanks @Alberto Perdomo. I'm running my application in a serverless environment (Vercel). But as you mention in your previous answer - PlanetScale supports a quite high number of database connections, I'm wondering if I really need PDP?
I do appreciate that "Connection pooling" is only one feature of many in the Database Platform you are building however, and I might use it for those reasons. But I'm trying to understand if it's really needed if "connection pooling" is the only thing I need atm (when using PlanetScale as well).
a
Probably not, if you are ok with the number of connections provided by the DB plan you are using. If that is enough or not will probably depend on your workloads. Probably worth trying out. In most cases my guess is that the number of supported connections is enough.
👍 1
v
Thanks @Alberto Perdomo
@Alberto Perdomo just FYI - I noticed that the API got a bit faster after removing the prisma data proxy, which makes sense. But it made me curious to understand how much "slower" a request will be if you use the proxy?
I guess it'd be more or less the latency between proxy and the database itself?
a
What kind of difference in latency are we talking about? In general, there are more moving parts, but there are a number of factors that come into play: • base latency - is the DP in the same region as your DB? it should be, ideally • cold starts - the proxy keeps a connection pool while hitting the DB directly from Lambdas might lead to frequent cold starts I don’t have data right now that I can share about additional latency. I would expect some requests to be faster directly (fewer hops, warm DB connection) and some to be slower (cold start, need to open a new DB connection). It will also depend on the DB that you are using and how expensive it is to create a new DB connection there. AFAIK, it’s more expensive on PG than MySQL.