<p>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 &quot;wrong&quot; location once some time in the 2000s.</p>
<p>In terms of what region is &quot;nearest&quot; - it seems geography is secondary to geopolitics and how fibre-cables are layed.</p>
<p>This github project: <a href="https://github.com/turnkeylinux/aws-datacenters" rel="nofollow noreferrer">https://github.com/turnkeylinux/aws-datacenters</a> 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.</p>
<p>Some (maybe) surprising latency results I found working with people:</p>
<ul>
<li>Norway seems to have better latency to North America than to central Europe (feedback from in-country technical person)</li>
<li>Israel better latency to Frankfurt than to Bahrain or Mumbai</li>
</ul>
<p>Also given this story and others as part of fallout from the Snowden releases <a href="https://www.dw.com/en/call-me-a-german-satellite-and-internet-company-wants-answers-from-the-nsa/a-17571811" rel="nofollow noreferrer">https://www.dw.com/en/call-me-a-german-satellite-and-internet-company-wants-answers-from-the-nsa/a-17571811</a> 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.</p>

CC BY-SA 4.0
2022-04-04T04:36:14.237Z
Thanks @jdog, this was really helpful!
Meet
CC BY-SA 4.0
2022-04-03T04:30:17.397Z
2022-04-03T04:30:17.397Z
jdog
<p>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?</p>
<p>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.</p>
<p>And in cases of not public clouds, generally how would you figure out which region to place your server at?</p>

<amazon-web-services><azure><google-compute-engine>
How to figure out optimum location for server for least latency to a target service?
Meet
# How to figure out optimum location for server for least latency to a target service?

(Asked by: username_0 on 2022-04-02)

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?

**Tags:** amazon-web-services, azure, google-compute-engine


---

## 1 answers

### Answer by username_1 on 2022-04-03. Score: 0 | Accepted answer

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.

> **Comments:**
> **username_0**: Thanks @username_1, this was really helpful!  

---

