Introduction: The Geography of Speed
When you type `netflix.com` in Europe, you connect to a server in Europe. When you type it in Japan, you connect to a server in Japan. How does the site orchestrate this geographical magic? They use one of two methods: Anycast BGP or GeoDNS.
The Network vs. The Phonebook
Anycast uses the physical network layer. The company uses the exact same IP address worldwide. Your router naturally sends the traffic to the physically closest server via BGP shortest paths. It is incredibly fast and DDoS resistant.
GeoDNS uses the 'Phonebook' layer. The DNS server looks at your IP address, sees you are in London, and returns a totally different IP address than it would give to someone in New York. It gives the company more logical control over exactly which server group handles which city.
Conclusion
Both methods are the secret sauce of global CDNs (Content Delivery Networks). Choosing between them is a classic 'Network Layer vs Application Layer' debate. See how your requests are routed here.