← Questions

Design a highly available load balancer

0
AmazonSystem designLast asked May 2026

A system design interview question asked in Amazon's system design round, last asked May 2026. It tests load balancing, high availability and networking.

Design a load balancer for HTTP and HTTPS traffic that spreads requests across backend servers and stays up when its own machines fail.

Requirements

  • Functional: accept client connections, terminate TLS if required, route requests to healthy backends using a chosen algorithm, and support adding and removing backends without downtime.
  • Functional: health checks that take a failing backend out of rotation and put it back once it recovers.
  • Non-functional: no single point of failure in the load balancer itself; high throughput; low added latency.
  • Non-functional: failover of a load balancer node in seconds without dropping most connections.

Clarifying questions

  • What traffic volume and how many backends?
  • Layer 4 (TCP) or layer 7 (HTTP routing by path or header)?
  • Does the load balancer terminate TLS, and where are the certificates kept?
  • Do sessions need to stick to one backend?
  • One data center, or several regions?

What a strong answer covers

  • Routing algorithms and when each fits: round robin, weighted, least connections, consistent hashing for stickiness or cache locality.
  • Health checks: active probes plus passive signals (errors, timeouts), thresholds to avoid flapping, and connection draining when a backend leaves.
  • Membership: how the list of backends and their health propagate to every load balancer node (a config service or gossip).
  • The load balancer's own availability: several nodes in active-active behind ECMP or anycast, or active-passive with a floating virtual IP (VRRP); DNS across regions.
  • Layer 4 versus layer 7 trade-offs, TLS termination cost, connection state, and what happens to in-flight connections when a node fails.
  • Observability (request rate, errors, latency per backend), autoscaling, and protection against overload (rate limits, shedding).

Follow-ups

  • A backend responds to health checks but times out on real requests. How do you notice?
  • One load balancer node dies. What happens to its open connections?
  • How do you roll out a new load balancer version without downtime?
  • How would you route users to the nearest region and fail over between regions?

Where it's asked

What it tests

load balancing · high availability · networking

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing