Fig. 1. The Earth, with each region’s limit drawn as its reply comes in. Drag to turn it.

thesandbox.page

As the light flies

Light in glass covers about 200 km a millisecond. A server that answers you in 20 ms, there and back, can’t be more than 2,000 km away. Ask thirty-four of them at once, and the places their answers allow overlap on one patch of the Earth.

Thirty-four regions are waiting on the globe. Nobody has asked them anything yet.

Your browser will send a few tiny requests to each of Amazon’s cloud regions. They see your address, as any site does. The timings stay here.

Fig. 2. Each reply against its region’s distance from the marked spot. Nothing falls below the line of light; over the right spot, the replies line up.

How it works

Light in glass

Signals cross the world as light in optical fibre, which slows it to about two thirds of its speed in a vacuum: roughly 200 km every millisecond. A round trip has to go there and back, so each millisecond of reply allows at most 100 km between you and the server. Nothing in a reply can make it come back sooner.

d ≤ ½ · t · ⅔c ≈ t × 100 km/ms

Circles that must overlap

Every reply draws a circle around its region that you have to be inside. Thirty-four circles leave only the places inside all of them. Turning delays into circles like this is constraint-based geolocation, set out by Gueye, Ziviani, Crovella, and Fdida in 2004. Measuring from 42 known points in Western Europe and 95 in the United States, they placed hosts to a median of under 25 km and under 100 km.

Slower than light

Real replies are slower. Cables follow coasts and meet at exchanges, and part of every reply is spent at your end: your Wi-Fi, your provider’s first hops, the server’s moment to answer. So for every spot on the globe the page fits a line, a shared delay plus so many milliseconds per kilometre, and keeps the spot where the replies sit closest along it, counting slow outliers for less, since a detour only ever adds time.

Where it goes wrong

A VPN or a work network starts your line somewhere else, and the page will find that place instead. Regions are sparse across Africa, central Asia, and the Pacific, so the circles there are wide. And each region is placed at the city it is named for; the buildings may be some tens of kilometres away.

The replies

  1. N. VirginiaUnited States––
  2. OhioUnited States––
  3. N. CaliforniaUnited States––
  4. OregonUnited States––
  5. MontréalCanada––
  6. CalgaryCanada––
  7. QuerétaroMexico––
  8. São PauloBrazil––
  9. DublinIreland––
  10. LondonUnited Kingdom––
  11. ParisFrance––
  12. FrankfurtGermany––
  13. ZürichSwitzerland––
  14. StockholmSweden––
  15. MilanItaly––
  16. AragónSpain––
  17. Tel AvivIsrael––
  18. BahrainBahrain––
  19. Abu DhabiUnited Arab Emirates––
  20. Cape TownSouth Africa––
  21. MumbaiIndia––
  22. HyderabadIndia––
  23. SingaporeSingapore––
  24. Kuala LumpurMalaysia––
  25. BangkokThailand––
  26. JakartaIndonesia––
  27. Hong KongChina––
  28. TaipeiTaiwan––
  29. SeoulSouth Korea––
  30. OsakaJapan––
  31. TokyoJapan––
  32. SydneyAustralia––
  33. MelbourneAustralia––
  34. AucklandNew Zealand––

Land from Natural Earth, through world-atlas. The regions answer a health check that Amazon keeps open to any page; nothing else is asked of them. Set in STIX Two Text.