I am based in Berlin and responses from my website got suddenly very slow. I checked the headers and it looks like all requests are now for some reason routed to the BOS region in the US which results in 300ms more latency.
If i connect via VPN to FRA though, then the responses are much faster since they get correctly served by the FRA region in Germany.
The questions is why requests from Berlin are served by BOS in US, but requests from Frankfurt are served from FRA.
I think part of the additional latency is caused by a back and forth between the server and DB which are in different regions. The DB is in FRA and there is currently no read replica in the US.
Generally, there are currently servers running in FRA (eu-west), LHR (eu-west), IAD (us-east) and SEA (us-west) and the DB is in FRA. So it is of course expected that the servers in the US have around 50-100ms extra latency because of the database connection.
That will be fixed by extra read replicas in the future, however I would expect my request in Germany not to be answered by a server in the US, but FRA instead.
I think what currently happens is request from BER goes to BOS, then to the server in IAD, which then queries the DB in FRA, which then sends data back to IAD, which then responds to my request from BER. So it’s a lot of back and forth which results in that latency I guess.
However if I connect via VPN to Frankfurt, I get a response in around 50ms.
Even if I VPN to other countries around, like Belgium for example, I get served much faster in under 100ms (AMS in that case). Just the routing for Berlin seems off.
Thanks for sending that over! Would you mind confirming the app and db names? (feel free to email this info over to support@fly.io if you’d prefer).
I /think/ I have the right app, but I want to make sure that we have all the right info we need to figure out what’s causing GTT to send traffic to Boston. I’m guessing that you see similar behavior when connecting over IPv4, too?
It definitely seems unlikely that fly proxy would avoid routing to any of the other, closer instances on your app for expected reasons, especially since things are working fine over your FRA VPN.
If you’re inclined, it’d be interesting (but not something I anticipate that we’d immediately need) to compare the two routes, come to think of it.
Looking over the forward route, it does look like loss is a little high, starting from the local ISP’s network. To be clear, I don’t imagine this explains the extra latency you’ve reported, but it is something that you might want to look into for better overall performance should you see it frequently on your traffic.
Thx for your quick response! The app is called “goodiful”, the DB is hosted on neon.tech.
It looks like the issue is resolved now! My requests are now routed to AMS. I would still expect FRA to be closer, but maybe AMS is actually faster - in any case, much better than US.