Skip to content

Load balancers: route, detect and drain

Choose a routing layer and algorithm, detect unhealthy targets, and remove instances without abandoning existing work.

20 min7 steps

By the end you can
  • Distinguish L4 connection routing from L7 request routing
  • Choose a balancing algorithm for workload and affinity needs
  • Explain health-check thresholds and detection delay
  • Explain the availability and balance costs of sticky sessions
  • Sequence connection draining during an instance replacement

Decide what the balancer can see

L4

  • Transport addresses and ports
  • Typically routes connections

L7

  • HTTP paths, headers and cookies
  • Can route individual requests

L4 balances transport flows without needing HTTP semantics. L7 understands the application protocol and can route /images separately from /checkout. Routing encrypted HTTP fields requires terminating or otherwise accessing decrypted traffic.

You must route /checkout to a different service from /images. Which capability is needed?

Answer this step to continue.