How to figure out optimum location for server for least latency to a target service?



  • Given a service URL / IP, how can we find the optimum location to spin up a server at? I suppose generally if we assume the service is on AWS, google cloud or azure, setting up the server in the same region as the target service should get us least latency?

    So in cases of these public clouds, how can you find out which region the target service is hosted at? I have thought like we could try to get the IP from DNS, and then get a location with reverse IP geolocation and use the region containing or near the location we got from the reverse IP geolocation. But I am not sure how accurate would the result be from these random reverse IP geolocation services.

    And in cases of not public clouds, generally how would you figure out which region to place your server at?



  • I think the geolocation of the IP address is generally quite accurate - this is from 15 years of my own anecdotal experience. I can only recall ever having seen an IP address having moved to th "wrong" location once some time in the 2000s.

    In terms of what region is "nearest" - it seems geography is secondary to geopolitics and how fibre-cables are layed.

    This github project: https://github.com/turnkeylinux/aws-datacenters maintains a list of fibre cables and AWS locations, I've extended it before to look at the latest AWS regions and so it can be used for other public cloud providers as well.

    Some (maybe) surprising latency results I found working with people:

    • Norway seems to have better latency to North America than to central Europe (feedback from in-country technical person)
    • Israel better latency to Frankfurt than to Bahrain or Mumbai

    Also given this story and others as part of fallout from the Snowden releases https://www.dw.com/en/call-me-a-german-satellite-and-internet-company-wants-answers-from-the-nsa/a-17571811 I would assume that for low latency to most of Northern Africa and Western Middle East, you are best to choose a server location in Germany or Italy.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2