Global Server Load Balancing (GSLB): DNS for High Availability

Global Server Load Balancing (GSLB) uses DNS to route users to the best data center, not just the best server. It considers geography, health, and load to provide disaster recovery and lower latency.
WHY IT EXISTS: Local load balancers are great for distributing traffic within a single data center, but what happens if that entire data center goes offline? Or if your users are in Asia and your servers are in Europe? GSLB was created to solve the problem of routing traffic between geographically separate data centers to improve reliability and performance on a global scale.
THE MENTAL MODEL: Think of GSLB as an exceptionally smart air traffic controller for the internet. A standard DNS server is like a flight schedule that tells you your flight to London goes to Heathrow. A GSLB is like a controller that checks weather, runway congestion, and airport status, and re-routes your plane from Heathrow to Gatwick if Heathrow has a problem. It directs user traffic to the best data center based on current conditions.
HOW IT WORKS: GSLB operates at the DNS layer. When a user tries to access your service, their DNS query is intercepted by a specialized GSLB DNS server. This server doesn't just return a single, static IP address. Instead, it runs logic. It might check the user's source IP to determine their geographic location and return the IP of the closest data center. It might also perform health checks on all data centers and only return IPs for healthy ones. Common routing policies include round-robin, geo-proximity, and weighted distribution for failover.
WHEN TO USE IT: Use GSLB for applications requiring high availability and disaster recovery. If one region fails, GSLB can automatically redirect all traffic to a healthy region. It's also essential for global applications where you want to serve users from the closest physical data center to reduce latency, for example, a user in Japan is served from a Tokyo data center instead of one in Ohio.
WHEN NOT TO USE IT: GSLB is not a replacement for local load balancing. GSLB gets traffic to the right data center; a local load balancer then distributes that traffic across the individual servers within that data center. Using GSLB for a single-region application is overkill. Because it relies on DNS, it's not for instantaneous, session-aware balancing; DNS caching means changes can take time to propagate.
ONE CANONICAL EXAMPLE: A large e-commerce site has data centers in the US, Europe, and Asia. They use GSLB with a geo-proximity policy. When a user from Germany visits the site, the GSLB's DNS server sees the request is from Europe and returns the IP address of the German data center's load balancer. If the entire German data center were to fail its health checks, the GSLB would automatically stop sending traffic there and instead route European users to the next-best option, perhaps the US data center, ensuring the site remains available.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.