Fetching time x20 from a server to an other with the same configuration

Hey,

I have a staging app and a prod app. Both have the same configuration.

On staging when I fetch google geocoding API I get a response in less than 200ms.
On prod I get a response in more than 5500ms…

The only differences can be DNS things but I don’t think it can cause this?

Anyone having an issue like this or have an idea to help me?

Thank you!

To get a little further in my test :

I used “fly ssh” to get in both my machines (Staging and Prod) and then proceeded to use curl to test the exact same http request to geocode (google api service).
The results are that Staging is making the request super fast. Prod is making the request almost as fast as Staging in this test, but it is still slower by a few hundreds of ms.

I check google’s headers response to the curl request, in both case google gives a “server-timing” response time from their end of about 50ms, which definitly means something is going wrong with Prod machine.

Note that this exact request we are sending to geocode is also made using Nodejs libraries (we tried several to debug this) that works just fine for plenty of external http request but for this one to google’s geocode service.
In our app, the request to geocode takes up to 6 000 MS which is insane when it takes only 200MS for Staging. Both environnements are the same.

We need help to understand why is there is such a delay on the Prod machine (both in our running app, and when I am ssh in the machine and try a manual curl !)

Thanks!!!

Just to double check, are two machines running in the same region? Can you run tracerooute in the both machines to check the path the request takes?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.