S
Supabase2mo ago
IG

Network latency?

Hello! I’m running a Vendure (Node.js/TypeORM) backend in Southern CA on my local machine, connected to a Supabase-hosted DB in Northern CA. When both my backend and DB are running locally, queries are instant. When connecting to the remote Supabase DB (local-to-cloud), even within the same state (CA), I see query latency ranging from 2s to 20s. Is this degree of latency for local-to-cloud connections (across regions) expected? Are there best practices or ways to minimize this? I am using Supabase Pro with Micro compute Thanks!
3 Replies
Lordvickthor
Lordvickthor2mo ago
Hi! Latency of 2–20s for local-to-Supabase queries is higher than expected. I can help diagnose the cause and optimize your setup with connection pooling, query tuning, or caching. Quick question: Are you using a single TypeORM connection per query or a connection pool? @IG
IG
IGOP2mo ago
Hi @Lordvickthor 👑 , thanks for the response. I have connection pooling set up with a max of 20. Thanks.
Lordvickthor
Lordvickthor2mo ago
Thanks for confirming! With pooling in place, the latency is likely from query execution or network routing. I can help profile your queries, check indexing, and optimize them to reduce delays. Do you want me to start with a query-level analysis? @IG

Did you find this page helpful?