Often attributed to hardware load balancers (such as HAProxy ALOHA), global server load balancing (GSLB) is an important high availability and performance feature. Companies distribute load balancing appliances across regional data centers to bring users and application infrastructure closer together—reducing latency and data transmission times.
How does global server load balancing (GSLB) work?
GSLB works by applying rules and conditions to govern traffic routing. First, a client will request a resource that lives at a certain URL, using DNS information. A GSLB server (either combined with or separate from) the load balancer and web servers determines a client's location before assigning them to a nearby load balancer/data center pair.
For example, users located within the western United States would be routed to an instance in North America (at the very least), while a European user would be pointed to the nearest EMEA instance. However, the number of edge locations an organization maintains can impact the effectiveness of their GSLB solution based on nearest availability.
This describes your typical GSLB setup. Other factors like server health and overall load can determine how load balancers allocate traffic for globally-distributed applications. While GSLB is traditionally synonymous with hardware appliances, modern software load balancers can also offer robust support.
What makes global server load balancing (GSLB) useful?
Global server load balancing delivers the following benefits to applications and their users:
Latency reduction – Connections and requests made to backend servers take less time to fulfill when they're geographically closer to the user.
Failover – When a primary data center goes offline, the load balancer can direct traffic to an active secondary data center.
Overload protection – Application traffic can be evenly distributed between all data centers in multiple locations.
Health checking – By determining whether an instance or server is working properly, the GSLB server can prevent application downtime by choosing a healthy destination for traffic.
Does HAProxy support global server load balancing (GSLB)?
Yes! Both HAProxy ALOHA appliances and HAProxy Enterprise enable GSLB functionality across multiple data centers. HAProxy Enterprise specifically can function as an authoritative Domain Name System (DNS) server in a limited capacity. We package this feature as a downloadable module for HAProxy Enterprise.
To learn more about how GSLB works within HAProxy, check out our global server load balancing documentation.