Hi everyone, I have a theory question. If a web ap...
# prisma-data-platform
r
Hi everyone, I have a theory question. If a web app were to use Prisma Data Proxy with a Postgresql DB, wouldn't it suffer from bad performance due to network latency? (Thinking about the latency of the request to the Data Proxy and the proxy to the DB, and then all of that back). To use a more concrete example, suppose I had an app in Workers (Cloudflare) talking to the Proxy (AWS) talking to some Postgresql DB (GCP), could a scenario like that make CRUD operations in the web app really slow? And if so what's a recommended way to not incur high latencies through this technology? Many thanks in advance.
c
I had a networks professor whose slogan was “from practice to theory and back to practice”--which is to say, computer networks theory is often derived from empirical results and problem-solving (and then used to improve upon it). You’d really have to try with your specific scenarios to understand whether it works or not unfortunately! To entertain the question though, I would argue that as long as your GCP db instance is near PDP (so presumably GCP
us-east4
) it wouldn’t be a huge additional network latency. The question as to whether PDP is better or worse than raw connection latency comes down to whether the database connection initialization latency is better or worse than network latency at scale--usually a safe bet since you’re betting against your postgres being handling a huge onslaught of connections, which has historically been true.
r
Thanks Casey! Great response and cool slogan