The optimal datacenter location for Mexico

Posted June 21, 2016 5.5k views

SFO seems the logical choice, but I get considerably worse response times between Mexico and SFO than between Sweden and AMS. Mexico/SFO are no doubt much farther apart than Sweden/AMS, and I imagine also more congested, but I had hoped for similar response times anyway (wishful thinking).

A rather simple (and same) PHP script that has an internal execution time of ~5 ms:
Sweden/AMS: 30-50 ms
Mexico/SFO: 110-160 ms

Both servers run the same plan ($20).

Any other datacenter that’s proven to be better?

Is there any data on this for different combinations?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Andres, Thanks for the time comparison San Francisco and Sweden from Mexico.
I have an app that serve Mexico too and did choose SFO just to find out that sometime it becomes a little slow! I was about to do what you did and compare in different sites, but you beat me. I wonder how did it go with NYC?


  • I host at NYZ now. It’s faster.

    Still, performance between Sweden and Amsterdam is much better than between Mexico City and New York (as well as between Sweden and New York).

    I haven’t calculated whether light speed can affect that much. There should be plenty of router hops between USA and Mexico though.

    I no longer use DigitalOcean directly. I instead have Cloudways host at DigitalOcean, but technically there’s no difference from before: The server and browser have no clue Cloudways is involved.

You are right that geographical distance is the primary factor in latency between locations, however, keep in mind that it’s not just distance but the actual path taken across networks and the number of hops.

The best thing to do is to spin up a droplet in a few different datacenters and then do a ping and traceroute. You can also try the NYC location to see if it provides better latency or a better network path than SFO.

Lastly, if you take a look at the traceroutes and if you see any anomalous hops or something that looks a bit congested you can open a support ticket with us and provide the traceroutes so that the network engineering team can take a look. Sometimes depending on geography and providers there maybe another peer we can add that can improve latency. This is especially true in areas like Southeast Asia where there are many countries bordering each other and various providers so while geographically you maybe traversing a small distance there maybe some odd hops that are taken that adding more peers can resolve.

Thanks for your answer.

Yes, I’m aware of how network structure can add to latency. I just thought that at least I don’t want to go across the Atlantic.

I’ll try out NYC.