moeseth
moeseth

Reputation: 1945

Why is Cloudfront serving me from datacenter far from me?

I'm located 1000 miles from Singapore. I use S3 in Singapore region with CloudFront to serve data.

When I download contents, cloudfront is serving me from US Washington server. (checking IP addresses)

Why doesn't it serve from Singapore instead?

Upvotes: 1

Views: 454

Answers (1)

Eric J.
Eric J.

Reputation: 150108

GeoIP lookups for IP addresses associated with CDN's is notoriously inaccurate.

Services that provide a GeoIP lookup gather information about the geographical assignment of each IP address from a wide range of sources and do their best to provide an accurate geographic assignment. In my experience, cheaper services are 80%-85% accurate, while the most expensive services are not more than around 90% accurate.

AWS does not publish the assignment of IP address to specific region. Instead, they designate the IP addresses merely as GLOBAL. As a result, the specific geography of each IP is likely unknown to the GeoIP service you are using. They make the best guess they can.

Additionally, a CDN will attempt to use the node with the least latency to you. Latency generally increases with geographic distance, but at times the longer route may offer lower latency due to a faster or less congested connection.

In your case, I suspect that you are receiving data from Singapore and your GeoIP provider is just getting the location of the IP wrong.

Upvotes: 3

Related Questions