jargon

Comparison

Load balancervsSession affinity

Load balancer

one address takes all the traffic and spreads it across the instances, skipping the ones failing their health check.

A component distributing requests across backends and removing unhealthy ones from rotation. Layer 4 balances connections and is fast and protocol-agnostic; layer 7 understands HTTP and can route, retry and rewrite. Its algorithm matters under uneven request costs: round robin sends work to a saturated instance, least-connections does not.

Full entry →

Session affinity

you pin each user to the same instance so the state cached in that process is still there on their next request.

Routing a client's requests consistently to one backend. It makes in-process state usable, which is sometimes the only practical option for WebSockets or large session data. It also breaks even load distribution, prevents clean draining on deploy, and turns one instance's death into a visible failure for a subset of users.

Full entry →

Related comparisons