Load Balancing & Proxying

Sticky Sessions (Session Affinity)

A load balancing configuration that ensures all requests from the same client are consistently routed to the same backend server for the duration of a session. Sticky sessions are implemented via cookie insertion (the LB sets a cookie containing the backend server ID) or source IP hashing. They are necessary for stateful applications that store session state in server memory rather than a shared store such as Redis. The trade-off is reduced load distribution effectiveness: if one backend receives many long-lived sticky sessions, it can become a hotspot while others remain underutilised.

Protocolos relacionados

Ver también