13

This is just out of curiosity.

I'm currently in South-east asia, and when I pinged domains such as bbc.co.uk and google.com (in California), I get latencies of around 5ms as below:

64 bytes from 151.101.192.81: icmp_seq=0 ttl=55 time=2.940 ms
64 bytes from 151.101.192.81: icmp_seq=1 ttl=55 time=3.785 ms
64 bytes from 151.101.192.81: icmp_seq=2 ttl=55 time=6.299 ms
64 bytes from 151.101.192.81: icmp_seq=3 ttl=55 time=4.065 ms
64 bytes from 151.101.192.81: icmp_seq=4 ttl=55 time=4.231 ms

I'd expect latencies of at least 50ms instead given the geo distance. What's going on behind the scenes? Also is the traffic via trans-ocean fibre optics?

  • I've run tests that don't involve CDNs and I'd estimate you're more likely to have latencies of 250 - 500ms between you and servers actually in Europe. Perhaps less, but you're right to think that global distances have effects on minimum latencies that no network topology can reduce. – Todd Wilcox May 14 at 16:15
  • Why don't you provide traceroute full output? – Satish May 20 at 20:31
19
  • Google in particular uses distributed datacenters around the globe. They announce the same IP network at various places and due to the way routing protocols work, you reach the nearest one.

  • bbc.co.uk points to an IP address that belongs to Fastly, Inc, a content delivery network, that also has points of presence around the world, including Asia, but I don't know if they use the same technique.
    (From France I have around 60ms to bbc.co.uk (151.101.192.81))

However, due to the extremely low latency you see, my bet is that you are not contacting the actual servers but this is a proxy that responds to you.

  • Proxy or load-balancer, which we use a lot based on which country you come from. – user56700 May 14 at 13:06
  • 2
    It doesn't have to be a strange proxy server; it's normal to have 4-5 ms latencies to a CDN, if the ISP directly peers with that CDN and your own uplink isn't Wi-Fi or ADSL... – grawity May 14 at 16:31
8

A cable half-way around the globe has a minimum latency of 100 ms, 200 ms round-trip (20,000 km distance / 200,000 km/s signal speed). In reality, links aren't as the crow flies (at all) and there are additional, active components in between, adding to latency - a more realistic figure is 200 or even 300 ms one-way.

Anything with lower latency or ping-time is closer to you. As Ron's already pointed out, large service provider use globally distributed infrastructure with location-specific DNS resolution or anycasting to connect you to a nearby server.

2

Major domains have servers around the world, and DNS set up so that you get an IP address that's close to you.

You can avoid this by pinging a specific host. For example, the Debian (GNU/Linux) project has a list of mirrors in countries world-wide. Most of those are specific hosts that will look up to the same IP regardless of where you are. Especially university software mirrors are almost never behind a content-delivery proxy network.

For example, mirror.csclub.uwaterloo.ca is in Waterloo, Ontario, Canada, and does respond to ping requests. I get ~37ms ping time to it right now (early morning) from Halifax, NS, Canada.

mirror.aarnet.edu.au in Australia is probably one of the farthest away from me; Australia as a whole is network-wise far from most of the rest of the world. (although South-East Asia is closer than most to it) My ping time is ~295ms.

And yes, speed-of-light delays imposed by distance around the earth's circumference are a major part of that, as well as routing delays on hops. (And remember, it's speed of light in glass fiber not vacuum. The index of refraction of the core of an optical fiber is often something like 1.3 to 1.4, so speed of light is c/1.4. (It has to be a higher index of refraction than the cladding to create total internal reflection, which is the whole point of optical fibers.) Modern fibers for use over long runs do try to keep their index of refraction down as low as possible for this reason.


Use traceroute or tracepath to find out the network path your packets take.

1

You seem to be making two fundamental assumptions

  • A domain name will always map to the same IP address.
  • An IP address will always route to the same server.

Neither of these assumptions is nessacerally true. DNS servers can return different results and IP addresses can route to different servers depending on the location of the client.

As you say there is a physical limit to how low the round trip times to a distant server can be, the inescapable conclusion then if you see low ping times to what you thought was a distant server is that the server was not as distant as you thought it was.

Operators of major sites put substantial effort into optimising the locations they serve end-user traffic from, motivated by some combination of performance and cost. They may do this in-house, they may engage the services of a third party content distribution network or they may use some combination of the two strategies.

1

You can use the online tool maplatency to get a comprehensive map of ping times from your location (among other things).

Here is an example of ping times from Paris:

enter image description here

  • Interesting tool but seems not working :( – Satish May 20 at 20:36
1

Result from all over the world using - https://tools.keycdn.com/ping

its pure CDN base domain.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.