Skip to content
StackDecode
System Design
8. Load Balancing and ScalabilityAnimated

Layer 7 Load Balancing

Balancing by HTTP content.

The idea

Reads the request path, headers and cookies to route intelligently, and can terminate TLS.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientL7 balancer/api servers/images servers/web servers
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

A layer 7 balancer reads the HTTP request.

step:
1/4
at:
Client
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Terminate TLS
  2. 2Read path and headers
  3. 3Pick a backend pool
  4. 4Forward the request

Where it is used

Path-based routing and canary releases.

Watch out for

More CPU and latency than layer 4.

Related