0
0
HLDsystem_design~12 mins

Global server load balancing (GSLB) in HLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Global server load balancing (GSLB)

Global Server Load Balancing (GSLB) distributes user requests across multiple geographically dispersed data centers. It improves availability, reduces latency by directing users to the closest or healthiest server, and balances traffic globally.

Architecture Diagram
User
  |
  v
+-----------------+
|   DNS Resolver  |
+-----------------+
          |
          v
+-----------------+       +-----------------+       +-----------------+
| GSLB DNS Server |<----->| Data Center A   |<----->| Local Load      |
+-----------------+       | (Web Servers)   |       | Balancer        |
          |               +-----------------+       +-----------------+
          |                       |                         |
          |                       v                         v
          |               +-----------------+       +-----------------+
          |               | Cache Layer     |       | Application     |
          |               +-----------------+       | Servers         |
          |                       |                         |
          |                       v                         v
          |               +-----------------+       +-----------------+
          |               | Database        |       | Monitoring      |
          |               +-----------------+       +-----------------+
          |
          |               +-----------------+       +-----------------+
          |               | Data Center B   |<----->| Local Load      |
          |               | (Web Servers)   |       | Balancer        |
          |               +-----------------+       +-----------------+
          |                       |                         |
          |                       v                         v
          |               +-----------------+       +-----------------+
          |               | Cache Layer     |       | Application     |
          |               +-----------------+       | Servers         |
          |                       |                         |
          |                       v                         v
          |               +-----------------+       +-----------------+
          |               | Database        |       | Monitoring      |
          |               +-----------------+       +-----------------+
Components
User
client
End user making requests to the service
DNS Resolver
dns_resolver
Resolves domain names for users
GSLB DNS Server
gslb_dns
Directs user requests to the best data center based on health and proximity
Data Center A
data_center
Hosts web servers and services for serving user requests
Local Load Balancer
load_balancer
Distributes traffic within a data center to application servers
Cache Layer
cache
Speeds up data access by caching frequently requested data
Application Servers
service
Processes business logic and user requests
Database
database
Stores persistent data for the application
Monitoring
monitoring_service
Checks health and performance of servers and services
Data Center B
data_center
Secondary data center for redundancy and load distribution
Request Flow - 14 Hops
UserDNS Resolver
DNS ResolverGSLB DNS Server
GSLB DNS ServerMonitoring
MonitoringGSLB DNS Server
GSLB DNS ServerDNS Resolver
DNS ResolverUser
UserLocal Load Balancer
Local Load BalancerCache Layer
Cache LayerLocal Load Balancer
Local Load BalancerApplication Servers
Application ServersDatabase
DatabaseApplication Servers
Application ServersLocal Load Balancer
Local Load BalancerUser
Failure Scenario
Component Fails:Data Center A
Impact:Users directed to Data Center A experience service disruption; requests fail or timeout
Mitigation:GSLB DNS detects health failure via monitoring and stops directing traffic to Data Center A, routing users to Data Center B instead
Architecture Quiz - 3 Questions
Test your understanding
Which component decides which data center a user should connect to?
AGSLB DNS Server
BLocal Load Balancer
CCache Layer
DDatabase
Design Principle
This design uses DNS-based global load balancing to direct users to the best data center, improving latency and availability. Local load balancers distribute traffic inside data centers. Health monitoring enables automatic failover. Caches reduce database load and speed up responses.