Fly.io express app (Chicago) slow queries to Neon (Ohio)
I'm trying to figure out what the latency I'm experiencing is caused by. I'm comparing Fly postgres with Neon. The increase in latency is insane, and so I doubt the regional differences is the issue here. Cold starts aren't the issue either, since I've done queries in quick succession.
NeonDB scenario:
Fly postgres scenario:
I've been able to reproduce this 10x increase in latency consistently. I've done
The following scenario is 10 identical queries for a non-existing row (SELECT), happening over the course of 1 minute.
From Fly (Chicago) => Neon (Ohio):
From local (in sweden) => Neon (Ohio):
Something seems way off here, and I'm unsure what it is. Fly postgres seems WAY quicker, and I'm not sure if it's because it's not using a serverless model, or if it's because of the region also being ORD (Chicago), or if it's something else.
Sorry for the long post. Any assistance would be greatly appreciated.
NeonDB scenario:
Fly postgres scenario:
I've been able to reproduce this 10x increase in latency consistently. I've done
EXPLAIN ANALYZE and the query is not part of the issue.The following scenario is 10 identical queries for a non-existing row (SELECT), happening over the course of 1 minute.
From Fly (Chicago) => Neon (Ohio):
From local (in sweden) => Neon (Ohio):
Something seems way off here, and I'm unsure what it is. Fly postgres seems WAY quicker, and I'm not sure if it's because it's not using a serverless model, or if it's because of the region also being ORD (Chicago), or if it's something else.
Sorry for the long post. Any assistance would be greatly appreciated.
