Bird
Raised Fist0
HLDsystem_design~20 mins

Global server load balancing (GSLB) in HLD - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
GSLB Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
How does GSLB improve user experience globally?

Imagine you have users all over the world accessing your website. How does Global Server Load Balancing (GSLB) help improve their experience?

ABy sending all user requests to a single central server to maintain consistency.
BBy directing users to the closest or fastest server to reduce latency and improve response time.
CBy randomly distributing user requests to any server regardless of location.
DBy caching all content on the user's device to avoid server requests.
Attempts:
2 left
💡 Hint

Think about how distance affects loading speed.

❓ Architecture
intermediate
1:30remaining
Which component is essential in a GSLB architecture for health checks?

In a GSLB system, which component regularly checks if servers are healthy and available?

AGlobal DNS server that performs health checks and updates routing accordingly.
BUser's browser that pings servers before sending requests.
CLoad balancer inside each data center without global coordination.
DContent Delivery Network (CDN) that caches static content only.
Attempts:
2 left
💡 Hint

Think about who decides where to send user requests globally.

❓ scaling
advanced
2:00remaining
How to scale GSLB to handle millions of global users?

You want your GSLB system to support millions of users worldwide. Which approach best supports this scale?

ARely on client-side load balancing to distribute traffic evenly.
BUse a single global DNS server with a large database to handle all requests.
CDeploy multiple global DNS servers with geo-redundancy and use Anycast IP for fast routing.
DUse only local load balancers in each data center without global coordination.
Attempts:
2 left
💡 Hint

Consider how to reduce latency and avoid single points of failure.

❓ tradeoff
advanced
2:00remaining
Tradeoff between DNS TTL and failover speed in GSLB

In GSLB, what is the tradeoff when setting a very low DNS TTL (time-to-live) value?

ALow TTL eliminates the need for health checks on servers.
BLow TTL reduces DNS query load but causes slow failover during outages.
CLow TTL improves caching efficiency but risks stale routing information.
DLow TTL allows fast failover but increases DNS query load and latency for users.
Attempts:
2 left
💡 Hint

Think about how often DNS records are refreshed and its impact.

❓ estimation
expert
2:30remaining
Estimate DNS query capacity for a global GSLB system

Your global website has 100 million daily active users. Each user makes 10 DNS queries per day on average. You deploy 5 global DNS servers. Estimate the average DNS queries per second each server must handle.

AApproximately 2300 queries per second per server.
BApproximately 2000 queries per second per server.
CApproximately 23000 queries per second per server.
DApproximately 20000 queries per second per server.
Attempts:
2 left
💡 Hint

Calculate total queries per day, then per second, then divide by servers.

Practice

(1/5)
1. What is the primary purpose of Global Server Load Balancing (GSLB)?
easy
A. To balance load only within a single data center
B. To direct user requests to the best global server based on location and health
C. To encrypt data between servers globally
D. To store user data in a centralized database

Solution

  1. Step 1: Understand GSLB's role in system design

    GSLB directs traffic globally to optimize speed and availability by choosing the best server.
  2. 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.
  3. Final Answer:

    To direct user requests to the best global server based on location and health -> Option B
  4. Quick Check:

    GSLB = directs users globally [OK]
Hint: GSLB chooses best global server, not just local load [OK]
Common Mistakes:
  • Confusing GSLB with local load balancing
  • Thinking GSLB handles data encryption
  • Assuming GSLB stores user data centrally
2. Which of the following is a correct component used in GSLB architecture?
easy
A. Global DNS server with health checks
B. Single local load balancer without DNS
C. Centralized database for user sessions
D. Static IP routing without failover

Solution

  1. Step 1: Identify key GSLB components

    GSLB uses global DNS servers that perform health checks to route users to healthy servers.
  2. 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.
  3. Final Answer:

    Global DNS server with health checks -> Option A
  4. Quick Check:

    GSLB = global DNS + health checks [OK]
Hint: GSLB needs DNS with health checks, not just local balancers [OK]
Common Mistakes:
  • Ignoring the role of DNS in GSLB
  • Confusing local load balancer as GSLB
  • Assuming static routing works for failover
3. Consider a GSLB setup with three data centers: US, Europe, and Asia. If the US data center is down, where will the DNS direct a user from Europe?
medium
A. To the closest healthy data center, Europe or Asia
B. To a random data center without health checks
C. To the US data center regardless of health
D. To the Asia data center only

Solution

  1. Step 1: Understand GSLB health check impact

    If the US data center is down, GSLB excludes it from routing decisions.
  2. 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.
  3. Final Answer:

    To the closest healthy data center, Europe or Asia -> Option A
  4. Quick Check:

    GSLB routes to closest healthy server [OK]
Hint: GSLB skips unhealthy centers, picks closest healthy [OK]
Common Mistakes:
  • Routing to down data center ignoring health
  • Choosing random data center without checks
  • Always routing to Asia regardless of location
4. A GSLB system is not redirecting traffic away from a failed data center. What is the most likely cause?
medium
A. User's browser cache is cleared
B. DNS TTL is set to zero
C. Load balancer inside data center is overloaded
D. Health checks are not configured or failing silently

Solution

  1. 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.
  2. 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.
  3. Final Answer:

    Health checks are not configured or failing silently -> Option D
  4. Quick Check:

    Health checks missing = no failover [OK]
Hint: Check health checks first if failover fails [OK]
Common Mistakes:
  • Blaming DNS TTL for failover issues
  • Confusing local load balancer issues with GSLB
  • Assuming browser cache affects server routing
5. You need to design a GSLB system for a global video streaming service. Which combination best improves user experience and reliability?
hard
A. Single global load balancer without DNS + static IP routing
B. Local load balancers only with no global routing
C. Global DNS with health checks + local load balancers + geo-proximity routing
D. DNS-based routing without health checks or load balancing

Solution

  1. 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.
  2. Step 2: Consider geo-proximity routing benefits

    Routing users to nearest data center reduces latency, improving streaming quality and reliability.
  3. Step 3: Eliminate less effective options

    Single load balancer or no health checks cause bottlenecks or failover issues; local only misses global optimization.
  4. Final Answer:

    Global DNS with health checks + local load balancers + geo-proximity routing -> Option C
  5. Quick Check:

    Combine global DNS, health checks, local balancers, geo-routing [OK]
Hint: Combine global DNS, health checks, and geo-routing for best results [OK]
Common Mistakes:
  • Ignoring health checks in DNS routing
  • Using single load balancer for global traffic
  • Skipping geo-proximity routing for latency
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard