Sticky Session

Problem

You have an application that unfortunately keeps user session state in local server memory. Moving every request freely between servers would break sessions.

Solution — Session Affinity

Route requests from the same client to the same backend when possible.
Alice → Server A
Alice → Server A
Alice → Server A
Bob → Server B
Core idea: sticky sessions preserve server-local session assumptions, at the cost of weaker distribution flexibility.