Sticky sessions.
also: sticky session · session affinity · server affinityThe load balancer sends all of one user's requests to the same server, so session data can stay in that server's memory.
the two-minute refresher
- The balancer hashes a cookie or IP to pick the server.
- Simple and fast: sessions live in local memory.
- A server crash logs its users out, and load gets uneven.
- Scaling out or draining a server breaks affinity: prefer a shared session store.