| Users | Traffic Characteristics | GSLB Impact | Infrastructure Changes |
|---|---|---|---|
| 100 users | Low requests, regional access | Simple DNS-based routing sufficient | Single data center, basic load balancer |
| 10,000 users | Moderate requests, some geo diversity | Need multiple regional data centers, basic GSLB | Deploy multiple data centers, DNS with geo-location |
| 1,000,000 users | High requests, global access, peak traffic | GSLB must handle failover, latency optimization | Multiple global data centers, health checks, latency-based routing |
| 100,000,000 users | Very high requests, global with spikes | GSLB must scale massively, integrate CDN, DDoS protection | Global distributed data centers, multi-layer load balancing, advanced monitoring |
Global server load balancing (GSLB) in HLD - Scalability & System Analysis
The first bottleneck in GSLB systems is usually the DNS resolution and health check system.
At scale, DNS servers can be overwhelmed by queries, and stale or slow health checks can cause poor routing decisions.
Also, network latency and inconsistent health data can cause traffic to route to unhealthy or distant servers, increasing user latency.
- DNS Scaling: Use Anycast DNS and multiple authoritative DNS servers worldwide to handle query load.
- Health Checks: Implement distributed, frequent, and fast health checks with caching to reduce load and improve accuracy.
- Latency-based Routing: Use real-time latency measurements and geo-IP databases to route users to the closest healthy server.
- Failover: Automatic failover to backup data centers when primary ones are down.
- Integration with CDN: Offload static content to CDN to reduce load on origin servers and improve global performance.
- Load Balancer Hierarchy: Combine global load balancers (GSLB) with local load balancers for efficient traffic distribution.
- DDoS Protection: Deploy network-level protections to handle large traffic spikes and attacks.
- Requests per second (RPS): At 1M users, assuming 1 request per second per 10 users, ~100,000 RPS globally.
- DNS Queries: Each user may generate multiple DNS queries; DNS servers must handle millions of queries per second at large scale.
- Bandwidth: For 100M users, assuming 100 KB per request, bandwidth needed is ~1 TB/s globally, requiring multi-region data centers and CDNs.
- Storage: Mainly for logs and health data; scalable with cloud storage solutions.
- Infrastructure: Multiple global data centers, Anycast DNS, CDN subscriptions, monitoring and security services.
Start by explaining the user growth and traffic patterns globally.
Identify the first bottleneck (DNS and health checks) and explain why.
Discuss scaling solutions step-by-step: DNS scaling, health checks, latency routing, failover, CDN integration.
Use real numbers to justify your choices and show understanding of global infrastructure challenges.
Your DNS servers handle 1000 queries per second. Traffic grows 10x. What do you do first?
Answer: Deploy additional authoritative DNS servers with Anycast IPs to distribute query load and reduce latency. Also, implement DNS caching and optimize TTL values to reduce query frequency.
Practice
Solution
Step 1: Understand GSLB's role in system design
GSLB directs traffic globally to optimize speed and availability by choosing the best server.Step 2: Differentiate GSLB from local load balancing
Local load balancing manages traffic inside a data center, while GSLB manages traffic across data centers worldwide.Final Answer:
To direct user requests to the best global server based on location and health -> Option BQuick Check:
GSLB = directs users globally [OK]
- Confusing GSLB with local load balancing
- Thinking GSLB handles data encryption
- Assuming GSLB stores user data centrally
Solution
Step 1: Identify key GSLB components
GSLB uses global DNS servers that perform health checks to route users to healthy servers.Step 2: Eliminate incorrect options
Local load balancers alone don't handle global routing; centralized databases and static IP routing don't provide dynamic failover.Final Answer:
Global DNS server with health checks -> Option AQuick Check:
GSLB = global DNS + health checks [OK]
- Ignoring the role of DNS in GSLB
- Confusing local load balancer as GSLB
- Assuming static routing works for failover
Solution
Step 1: Understand GSLB health check impact
If the US data center is down, GSLB excludes it from routing decisions.Step 2: Determine routing for European user
The DNS directs the user to the closest healthy data center, which could be Europe or Asia depending on proximity and health.Final Answer:
To the closest healthy data center, Europe or Asia -> Option AQuick Check:
GSLB routes to closest healthy server [OK]
- Routing to down data center ignoring health
- Choosing random data center without checks
- Always routing to Asia regardless of location
Solution
Step 1: Analyze GSLB failure to redirect
If traffic is not redirected from a failed data center, health checks likely are missing or not reporting failures.Step 2: Evaluate other options
DNS TTL zero causes frequent lookups but doesn't prevent failover; local load balancer overload or browser cache do not affect global DNS routing.Final Answer:
Health checks are not configured or failing silently -> Option DQuick Check:
Health checks missing = no failover [OK]
- Blaming DNS TTL for failover issues
- Confusing local load balancer issues with GSLB
- Assuming browser cache affects server routing
Solution
Step 1: Identify key GSLB features for video streaming
Global DNS with health checks ensures users reach healthy servers; local load balancers distribute load inside data centers.Step 2: Consider geo-proximity routing benefits
Routing users to nearest data center reduces latency, improving streaming quality and reliability.Step 3: Eliminate less effective options
Single load balancer or no health checks cause bottlenecks or failover issues; local only misses global optimization.Final Answer:
Global DNS with health checks + local load balancers + geo-proximity routing -> Option CQuick Check:
Combine global DNS, health checks, local balancers, geo-routing [OK]
- Ignoring health checks in DNS routing
- Using single load balancer for global traffic
- Skipping geo-proximity routing for latency
Ready to prove it?
Pass the test and this pattern moves unknown
