Sticky Session
also: session affinity
Load-balancer routing that pins a user to the same backend instance — a workaround for stateful servers.
A sticky session (session affinity) is when a load balancer consistently routes a given user to the same backend instance, usually via a cookie or their IP. It exists to support servers that keep per-user state in local memory.
Worked example: a server holding a user’s shopping cart in local RAM needs sticky sessions so the user keeps hitting the instance that has their cart. Gotcha: stickiness undermines the benefits of load balancing — load can become uneven, and if that instance dies the user loses their state — which is why the better fix is usually to make the service stateless (store the cart in a shared store) rather than rely on affinity.