Tutorials System Design Mastery

Global Server Load Balancing (GSLB) & Anycast

On this page

Global Traffic Management

How does google.com work for 4 billion people? They don't have one big load balancer. They use Anycast and GSLB to route you to the nearest data center before you even touch a server.

1. Anycast (The Magic of Routing)

In Anycast, multiple data centers across the globe all advertise the **Exact Same IP Address**. When you send a packet, the internet routers automatically send it to the 'Closest' data center (based on network hops). This is how YouTube and Netflix handle massive traffic without a bottleneck.

2. GSLB (DNS-based Scaling)

GSLB uses smart DNS. When you ask for the IP of mysite.com, the GSLB server looks at your IP, sees you are in London, and gives you the IP of the London data center. If the London center is down, it gives you the Paris IP instead.

4. Interview Mastery

Q: "Why is Anycast better than DNS for Failover?"

Architect Answer: "DNS has the **TTL (Time To Live)** problem. If a data center goes down, and you update your DNS, many users will still have the 'Old' IP cached for hours. Anycast happens at the **BGP (Border Gateway Protocol)** level. If a data center dies, the routers detect the loss of the path and start routing traffic to the next closest center in milliseconds. It is much faster and more reliable than DNS for global disaster recovery."

Questions on this lesson 0

Sign in to ask a question or upvote helpful answers.

No questions yet — be the first to ask!

System Design Mastery
Course syllabus
1. Distributed Systems Fundamentals
2. Database Scalability
3. Caching & CDN Strategies
4. Event-Driven Architecture
5. High Availability & Load Balancing
6. Microservices & API Gateway
7. Monitoring & Disaster Recovery
8. FAANG System Design Interview
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details