# Global load balancer

> Source: Courseiva IT Certification Glossary — https://courseiva.com/glossary/global-load-balancer

## Quick definition

A global load balancer is like a smart traffic director for the internet. When you visit a website, it sends you to the closest or least busy server, so pages load faster. It helps keep websites running even if one server or data center fails. This is important for big websites that have users all over the world.

## Simple meaning

Think of a global load balancer as the world's most intelligent air traffic controller for internet traffic. When you try to visit a website, your request doesn't just go straight to one place. Instead, it first hits the global load balancer, which looks at where you are in the world and how busy each of the website's servers is. Then it sends you to the best server for you. 

 For example, if you are in New York and a website has servers in New York, London, and Tokyo, the global load balancer will send you to the New York server. That makes the website load much faster because the data doesn't have to travel across the ocean. If the New York server is overloaded or goes down, it will automatically send you to London or Tokyo instead. 

 This works because the global load balancer uses special internet tricks. It uses something called DNS to give your computer the IP address of the best server. It also constantly checks the health of all the servers. If one is running slowly or is broken, it stops sending traffic there until it is fixed. 

 The key idea is that a global load balancer manages traffic across multiple data centers around the world, not just within a single building. This is what makes it "global." It makes the internet feel fast and reliable no matter where you are, and it helps big companies handle millions of users without crashing.

## Technical definition

A global load balancer (GLB) is a traffic management solution that operates at the global scale, typically using the Domain Name System (DNS), Anycast routing, or a combination of both, to distribute incoming client requests across multiple geographically dispersed data centers or server pools. The primary goal is to optimize application performance, ensure high availability, and provide disaster recovery by routing traffic away from failed or overloaded sites. 

 The most common implementation of a global load balancer is DNS-based load balancing. In this model, the GLB acts as an authoritative DNS server for the domain. When a client performs a DNS lookup for the application's hostname, the GLB does not return a single IP address. Instead, it returns the IP address of the optimal data center based on predefined policies. These policies can include geographic proximity (GeoDNS), server load, latency measurements, or round-robin distribution. The client then connects directly to that IP address. Because DNS results are cached by clients and intermediate resolvers, DNS-based GLBs often use short Time-To-Live (TTL) values to enable rapid failover, though this is a trade-off with increased DNS query volume. 

 Another approach uses Anycast routing. In an Anycast setup, multiple data centers announce the same IP address (or range) to the global internet routing table. Routers on the internet, using the Border Gateway Protocol (BGP), automatically send each client's traffic to the nearest data center based on the shortest AS path. This method is highly resilient and provides automatic failover at the network level, but it offers less granular control over traffic distribution compared to DNS-based methods. Many commercial CDN and cloud providers use Anycast for their edge networks. 

 A modern global load balancer also performs active health checks. It continuously probes the availability and performance of each backend data center. Health checks can be simple ICMP pings or more sophisticated HTTP requests that verify a specific application response. If a data center fails its health check, the GLB stops directing traffic to that site. For DNS-based GLBs, this means returning the IP of a healthy site instead. For Anycast-based GLBs, the failed site withdraws its BGP route advertisement, causing traffic to automatically flow to the remaining sites. 

 In a typical IT implementation, a global load balancer is paired with local load balancers. The global layer directs traffic to the correct data center, and then the local load balancer inside that data center distributes the traffic among the individual servers. Protocols like HTTP and HTTPS are common at the application layer, while TCP and UDP are managed at the transport layer. GLBs often support session persistence (sticky sessions) by using cookies or source IP hashing to ensure a user consistently reaches the same data center during a session. 

 Advanced global load balancers incorporate real-time performance data. They can measure latency from various vantage points or use client-side probes to determine the fastest data center for each user. This dynamic routing goes beyond simple geographic lookup. The technology is foundational for cloud computing, SaaS platforms, and any globally distributed application requiring 99.99% uptime or better.

## Real-life example

Imagine a worldwide chain of theme parks called FunWorld. FunWorld has parks in Orlando, Paris, and Tokyo. You are in New York City and you want to go to a FunWorld park today. You don't want to drive all the way to Orlando if you don't have to. Instead, you look at a map and see which park is closest. But you also check online to see which park has the shortest lines today. One park might be having a special event and is very crowded. 

 A global load balancer works exactly like this intelligent decision-making system. Instead of a person choosing a theme park, the GLB chooses a data center. The closest data center is like the park in Orlando-it takes less time to reach. But the GLB also checks how busy each data center is, just like you would check the wait times for rides. If the Orlando data center is overloaded, the GLB will send you to the Paris data center, even though it is farther away, because you will get a faster response there. 

 Now imagine a huge storm shuts down the Orlando park completely. The GLB detects this immediately. It stops sending any new guests to Orlando and reroutes everyone to Paris or Tokyo. This is failover. You, as the guest, don't even notice the storm. You just drive to a different park and have a good time. This is exactly how a global load balancer keeps internet services running during a data center outage, hardware failure, or network problem. The users never see the failure because the GLB directs them to a healthy site.

## Why it matters

In the modern IT landscape, applications are rarely hosted in a single location. Companies deploy their services across multiple cloud regions and on-premises data centers for redundancy, performance, and regulatory compliance. A global load balancer is the critical component that makes this architecture work. Without it, a failure in one data center would cause a complete outage for all users connected to that site. 

 From a practical standpoint, global load balancing directly impacts user experience. Studies show that even a one-second delay in page load time can lead to significant drops in conversion rates and user satisfaction. By routing users to the fastest available server, a GLB minimizes latency. This is especially important for applications that handle real-time interactions, such as video streaming, online gaming, and financial trading platforms. 

 Global load balancers are also essential for disaster recovery and business continuity. In the event of a natural disaster, power outage, or cyberattack that takes down a primary data center, the GLB automatically reroutes traffic to secondary sites. This self-healing capability ensures that service-level agreements (SLAs) are met and that revenue loss is minimized. IT professionals must understand GLB configuration, health check tuning, and traffic routing policies to maintain a resilient infrastructure. 

global load balancers help with cost optimization. They can be configured to send more traffic to cheaper data centers during off-peak hours or to balance load across cloud providers to avoid vendor lock-in. They also enable blue-green deployments and canary releases, where a small percentage of traffic is routed to a new version of an application for testing before a full rollout. Without a GLB, these advanced deployment strategies become much more difficult to implement safely.

## Why it matters in exams

The concept of global load balancing appears in several major certification exams, though it is often tested as part of broader networking, cloud, or high-availability objectives. For the AWS Certified Solutions Architect Associate exam, global load balancing is a core topic under the categories of Route 53 (DNS-based routing) and Global Accelerator (Anycast-based routing). Exam questions often present a scenario requiring the design of a multi-region architecture and ask which service provides the best global load balancing for latency reduction or disaster recovery. You need to know the difference between simple routing, weighted routing, latency routing, and geolocation routing policies in Route 53. 

 For the Google Cloud Professional Cloud Architect and Google Cloud Associate Cloud Engineer exams, global load balancing is a fundamental concept. Google Cloud offers a native global load balancer that uses Anycast and is a single external IP address that spans all regions. Questions will test your understanding of how this differs from regional load balancers and how it integrates with backend services, health checks, and Cloud CDN. You may be asked to design a globally resilient application and choose the correct load balancing tier. 

 For the Microsoft Azure AZ-900 and AZ-104 certifications, the Azure Traffic Manager service is the primary global load balancer. The exam objectives include understanding the difference between Traffic Manager (DNS-based, global) and Azure Load Balancer (regional, layer 4). Scenario-based questions may require you to select Traffic Manager for multi-region failover or performance routing. 

 For the CompTIA Network+ exam (N10-008), global load balancing is covered in the context of network redundancy and high availability. While the exam focuses more on local load balancing, you may encounter questions about DNS round-robin, Anycast routing, and how organizations use these methods to create fault-tolerant networks. The exam may ask you to interpret a network diagram that includes a global load balancer and explain its function. 

 For the Cisco CCNP and CCIE exams, global load balancing is part of advanced routing and WAN optimization topics. You may need to understand how to configure BGP with Anycast to provide global load balancing and how to manipulate route advertisements to control traffic flow. These exams go deeper into protocol-level details. Regardless of the exam, a solid understanding of health checks, DNS TTL, and routing policies is essential for answering GLB-related questions correctly.

## How it appears in exam questions

On certification exams, global load balancer questions typically fall into several patterns. The most common is the scenario-based design question. For example, a question might describe a company with users in North America, Europe, and Asia. The application is deployed in two AWS regions (us-east-1 and eu-west-2). The company needs to minimize latency and automatically failover if one region becomes unavailable. The correct answer would be to use Amazon Route 53 with latency-based routing and health checks. A distractor might be a regional load balancer like an Application Load Balancer, which only works within a single region. 

 Another frequent question pattern involves configuration. For instance, a question shows a partial configuration for Azure Traffic Manager and asks you to choose the correct endpoint type (Azure endpoint, external endpoint, nested endpoint) based on the scenario. You might be asked why a global load balancer is not working as expected. The answer could involve a misconfigured health check, a TTL that is too long preventing fast failover, or mismatched routing policies. 

 Troubleshooting questions are also common. A question might state that after deploying a global load balancer, some users in South America are experiencing high latency while others in North America are not. The cause could be that the GLB is using geolocation routing but the user's IP is incorrectly mapped to a distant region. Alternatively, the GLB might be using round-robin without regard to proximity. You would need to change the routing policy to latency-based or check the IP geolocation database. 

 Some questions test your understanding of the difference between global and local load balancing. A question might ask: "Which load balancer should you use to distribute traffic across two different data centers?" The correct answer is a global load balancer (such as a DNS-based service or traffic manager). A distractor might suggest a hardware load balancer like an F5 BIG-IP (which is typically local). You must know that local load balancers are for distributing traffic among servers within a single data center, while global load balancers are for distributing among data centers. 

 Finally, you may encounter questions about DNS TTL values. A question could say: "An administrator sets the DNS TTL for a global load balancer to 86400 seconds to reduce DNS query costs. A data center fails. How long until traffic is rerouted?" The answer is up to 24 hours. This highlights the trade-off between performance and granularity. The correct approach in a production environment is to use a short TTL (e.g., 60 seconds) for the GLB record to allow rapid failover.

## Example scenario

Your company, StreamFast, provides a video streaming service with users in the United States and Europe. You have deployed the application in two AWS regions: us-east-1 (Virginia) and eu-west-1 (Ireland). Each region has its own local Application Load Balancer and auto-scaling group of web servers. Management wants to ensure that users automatically connect to the region that provides the lowest latency, and if one region goes completely offline, all traffic should fail over to the remaining healthy region. 

 To solve this, you decide to use Amazon Route 53 as a global load balancer. First, you create a DNS hosted zone for your domain, streamfast.example.com. Inside this hosted zone, you create a record set of type A with a routing policy set to "Latency." You create two latency records: one for us-east-1 pointing to the public IP of the ALB in Virginia, and one for eu-west-1 pointing to the public IP of the ALB in Ireland. For each record, you also configure health checks. The health check pings a specific URL like https://streamfast.example.com/health on the ALB. 

 Now, when a user in New York looks up streamfast.example.com, Route 53 measures the latency between the user's DNS resolver and the two regions. It finds that us-east-1 has lower latency and returns the IP of the Virginia ALB. The user connects and streams video with low buffering. A user in London gets the IP of the Irish ALB. One day, the Virginia data center experiences a power outage. The health check for us-east-1 fails. Route 53 stops returning that IP address and sends all traffic (even from New York users) to the healthy eu-west-1 region. Users experience a brief glitch while the DNS cache refreshes, but within the TTL window, the service is restored. This scenario demonstrates the core value of a global load balancer: automatic performance optimization and disaster recovery.

## Common mistakes

- **Mistake:** Thinking a global load balancer distributes traffic to individual servers like a local load balancer does.
  - Why it is wrong: A global load balancer distributes traffic among data centers or regions, not among individual servers. It is the outer layer of traffic management. The individual server distribution is handled by a local load balancer inside each data center.
  - Fix: Remember the hierarchy: global load balancer → data center → local load balancer → servers. The global one is for geography and disaster recovery, the local one is for fine-grained distribution within a site.
- **Mistake:** Setting a very long TTL for the DNS record of a global load balancer to improve performance.
  - Why it is wrong: A long TTL means DNS resolvers cache the IP address for a long time. If the primary data center fails, traffic continues to be sent to the failed site until the cache expires, causing a long outage.
  - Fix: Use a short TTL (e.g., 30–60 seconds) for records that need fast failover. Understand that the trade-off is more DNS queries, which is a small cost for high availability.
- **Mistake:** Assuming all global load balancers use DNS only.
  - Why it is wrong: Some global load balancers use Anycast routing at the network layer, which does not rely on DNS. AWS Global Accelerator and Google Cloud Global Load Balancer use Anycast to provide a single IP that routes to the nearest healthy region. DNS-based and Anycast-based GLBs have different characteristics.
  - Fix: Learn the two main methods: DNS-based (Route 53, Traffic Manager) and Anycast-based (Global Accelerator, Cloud Load Balancing). Know when to use each.
- **Mistake:** Not configuring health checks for the endpoints behind a global load balancer.
  - Why it is wrong: Without health checks, the GLB will continue to send traffic to a failed or degraded data center. This defeats the purpose of high availability.
  - Fix: Always configure health checks for each endpoint. Use application-layer health checks (e.g., HTTP 200) rather than simple ICMP, as they verify the actual service is functioning.
- **Mistake:** Confusing global load balancers with content delivery networks (CDNs).
  - Why it is wrong: A CDN caches static content (images, videos) at edge locations to serve it faster, while a GLB routes live traffic to backend servers. They are complementary but not the same. Sometimes a CDN uses a GLB internally, but the GLB itself does not cache content.
  - Fix: A GLB is for directing requests to origin servers in different regions. A CDN is for caching content closer to users. Both improve performance, but in different ways.

## Exam trap

{"trap":"In a DNS-based global load balancer question, the exam might include a scenario where the GLB is using round-robin routing instead of latency-based routing, and the student is asked to identify the performance issue. The trap is that the student might think round-robin is fine for load distribution without considering geographic distance.","why_learners_choose_it":"Learners often see the term 'load balancer' and assume all types distribute load evenly, which round-robin does. They may not consider that a user in Australia and a user in the US should not be sent to the same data center if there is a closer one.","how_to_avoid_it":"Always examine the routing policy in the question. If the goal is low latency for a global user base, choose latency-based or geolocation routing, not round-robin. Round-robin is acceptable only when all data centers are in the same region or when the goal is simply to spread load without performance consideration."}

## Commonly confused with

- **Global load balancer vs Local load balancer:** A local load balancer (like an AWS ALB or Nginx) distributes traffic among servers within a single data center or availability zone. A global load balancer distributes traffic among multiple data centers or regions. The local one handles server health and session persistence within a site; the global one handles geographic routing and disaster recovery across sites. (Example: A local load balancer sends users to different web servers in the same building. A global load balancer decides whether to send the user to the building in New York or London.)
- **Global load balancer vs Content delivery network (CDN):** A CDN caches static resources (images, CSS, videos) at edge servers close to users to reduce latency. A global load balancer directs traffic to the best origin data center. A CDN can improve performance for static content, but it does not route traffic to backend servers for dynamic requests. They often work together: the CDN may use a GLB to determine which origin to fetch from. (Example: A CDN stores a copy of a movie poster on servers worldwide. A global load balancer decides which data center should serve the movie itself.)
- **Global load balancer vs DNS round-robin:** DNS round-robin is a simple technique where multiple IP addresses are returned for a single hostname in a rotating order. It distributes traffic evenly but does not consider server health, load, or geographic location. A true global load balancer like Route 53 or Traffic Manager offers health checks, latency routing, and weighted distribution. DNS round-robin is a basic form of global distribution but lacks intelligence. (Example: DNS round-robin is like a doorman who lets people in through any door in turn, even if one door is blocked. A global load balancer is a smart doorman who checks which door is fastest and safest.)

## Step-by-step breakdown

1. **Client DNS lookup** — A user types a URL in their browser. The browser initiates a DNS query to resolve the domain name. This request goes to the client's local DNS resolver, which may be managed by their ISP or a public DNS service like Google DNS.
2. **GLB receives the lookup** — The local DNS resolver does not have the answer cached, so it queries the authoritative DNS server for the domain. This authoritative server is actually the global load balancer (e.g., Amazon Route 53). The GLB sees the incoming lookup and prepares to make a routing decision.
3. **Routing policy evaluation** — The GLB evaluates its routing policy. This could be latency-based, geolocation-based, weighted, or simple round-robin. If it is latency-based, the GLB uses data from health probes to predict the fastest endpoint for the resolver's location. If it is geolocation-based, it looks up the resolver's IP in a database to determine the user's region.
4. **Health check verification** — Before returning an IP address, the GLB checks the health of the selected endpoint. It maintains a real-time list of healthy endpoints based on periodic health checks. If the best endpoint by routing policy is unhealthy, the GLB selects the next best healthy endpoint. This ensures no traffic is sent to a failed site.
5. **DNS response sent to client** — The GLB sends a DNS response containing the IP address of the optimal healthy data center's public endpoint (e.g., the IP of a local load balancer). The response includes a TTL value. The client's resolver caches this result for the TTL duration.
6. **Client establishes connection** — The client now has the IP address of the chosen data center's local load balancer. It establishes a TCP connection to this IP address. The local load balancer then distributes the request to a specific backend server within that data center based on its own rules (e.g., least connections).
7. **Continuous monitoring and failover** — The GLB continuously monitors the health of all endpoints. If an endpoint fails, the GLB updates its routing table and stops returning that IP. For DNS-based systems, failover time is limited by the TTL. For Anycast-based systems, failover happens almost instantly as the routing protocol converges.

## Practical mini-lesson

In a real-world IT environment, a global load balancer is not just a single service but a component of a larger architecture. As a cloud architect or network engineer, you need to understand how to configure and troubleshoot GLBs in multiple cloud providers and in hybrid setups. Let's look at the practical implementation details that matter. 

 First, you must decide between DNS-based and Anycast-based global load balancing. DNS-based solutions like Azure Traffic Manager or AWS Route 53 are easier to set up and work with any backend, including on-premises data centers. However, they have a failover latency of at least the DNS TTL. For latency-sensitive applications, Anycast-based solutions like AWS Global Accelerator or Google Cloud Global Load Balancer provide faster failover and often better performance because they operate at the network layer. They can also provide static IP addresses, which is useful for whitelisting in firewalls. 

 Second, health checks are critical and often misconfigured. A common best practice is to create a dedicated health check endpoint on your application that returns a 200 OK status only if the application and its dependencies (like databases and caching layers) are all functional. This is called a deep health check. Avoid health checks that only test the web server process, because the web server might be running but the backend database might be unreachable, causing application errors. 

 Third, consider the implications of DNS caching. In a production environment, you cannot control all the DNS resolvers in the world. Some ISP resolvers may ignore TTL values and cache records for longer periods. To mitigate this, you can use a multi-layered approach: use a short TTL (e.g., 60 seconds) plus a secondary health check, and also use an Anycast layer for immediate failover. Many global applications use both: Route 53 for initial traffic steering and Global Accelerator for low-latency routing and fast failover. 

 Fourth, you need to think about session persistence at the global level. If a user is shopping and puts items in a cart, you generally want them to stay in the same data center during their session. DNS-based GLBs can provide a form of persistence by returning the same IP for a client as long as their resolver's cache is valid and the endpoint is healthy. For more deterministic persistence, you can use application-level cookies or integrate with a global session store like Redis or DynamoDB. 

 Finally, what can go wrong? A common pitfall is misconfigured routing policies that create a "thundering herd" problem. For example, if you use a weighted routing policy and one region suddenly becomes unhealthy, all the weight shifts to the other region, potentially overwhelming it. You should design for capacity so that each region can handle the full load during a failover scenario. Another issue is the asymmetric routing problem when using Anycast: traffic to the application might go to one region, but responses might take a different path, which can cause issues with stateful firewalls. Understanding these practical details is what separates a knowledgeable IT professional from a novice.

## Memory tip

GLB remembers: 'Goes between Lands', GloBal directs traffic Between different Lands (data centers), while local load balancers work within a single Land.

## FAQ

**Can a global load balancer work with on-premises data centers?**

Yes, most cloud-based global load balancers support external endpoints. You can add the public IP of your on-premises load balancer as an endpoint, and the GLB will route traffic to it based on your policies and health checks.

**Does a global load balancer encrypt traffic?**

Not directly. The GLB itself does not terminate or encrypt traffic. It directs traffic to the appropriate backend. Encryption (HTTPS) should be handled by the load balancer or web server in the target data center.

**What is the difference between latency routing and geolocation routing?**

Latency routing sends traffic to the data center with the lowest measured network latency from the user's DNS resolver. Geolocation routing sends traffic to a data center based on the user's geographic location (country or continent). Geolocation is useful for compliance or regional content, while latency routing focuses on speed.

**How fast does failover happen with a DNS-based global load balancer?**

Failover time depends on the DNS TTL. If the TTL is set to 60 seconds and the health check detects failure within a few seconds, failover is complete within about one minute. However, DNS resolvers that ignore TTL can cause delays of hours for some users.

**Is a global load balancer the same as a reverse proxy?**

No, a reverse proxy receives requests and forwards them to backend servers, often performing functions like caching, SSL termination, and request modification. A global load balancer simply directs traffic to the best data center, but it can be combined with a reverse proxy.

**What is a weighted routing policy in a global load balancer?**

Weighted routing allows you to distribute traffic across multiple endpoints according to assigned weights. For example, you can send 70% of traffic to us-east-1 and 30% to us-west-2. This is useful for testing new versions or gradually migrating users.

## Summary

A global load balancer is an essential technology for any organization that operates services across multiple geographic regions. It intelligently routes incoming traffic to the best available data center based on factors like latency, location, and server health. This ensures users experience fast, reliable access to applications while providing automatic failover in case of a data center outage. 

 For IT certification candidates, understanding global load balancing is crucial across many exams, including AWS Solutions Architect, Azure Administrator, Google Cloud Architect, and CompTIA Network+. You must know the difference between DNS-based and Anycast-based methods, how to configure routing policies, and the importance of health checks and TTL management. 

 The key takeaway for your exam preparation is to focus on scenario-based questions. Always identify whether the problem requires geographic routing, failover, or latency reduction. Use the correct service and routing policy for the need. Remember that a global load balancer works at the region level, not the server level. By mastering this concept, you will be well prepared to design and troubleshoot globally distributed systems in both the exam room and real-world IT.

---

Practice questions and the full interactive page: https://courseiva.com/glossary/global-load-balancer
