← Lessons

quiz vs the machine

Gold1430

Networking

Load Balancer High Availability

Avoiding the single point of failure when the balancer itself goes down.

5 min read · core · beat Gold to climb

The balancer must not be the weak link

A load balancer protects backends from individual failures, but if there is only one balancer it becomes the single point of failure. High availability means the balancing layer survives the loss of any one node.

Active passive

  • Two balancers share a virtual IP; one is active, the other standby.
  • They exchange heartbeats over a protocol such as VRRP.
  • If the active fails, the standby takes over the virtual IP, usually in seconds.
  • Simple, but half your capacity sits idle.

Active active

  • Multiple balancers all serve traffic at once.
  • Traffic reaches them via ECMP routing or an anycast address.
  • Loss of one node sheds only its share, and the rest absorb it.
  • Better capacity use, but flows must be steered consistently, often with the same hashing on every node.

Shared state

Stateful balancers must handle failover of in-flight connections.

  • Connection sync replicates connection tables between balancers so a takeover does not reset live flows.
  • Consistent hashing or Maglev tables let a surviving node derive the same backend for a flow without shared state.

Key idea

Load balancer high availability removes the single point of failure using active passive failover of a virtual IP or active active with ECMP or anycast, optionally syncing connection state so live flows survive a takeover.

Check yourself

Answer to earn rating on the learn ladder.

1. In an active passive balancer pair, the standby:

2. An advantage of active active over active passive is:

3. How can a surviving balancer keep live flows on the same backend after takeover?