sticky session
A load balancer setting that sends every request from one client to the same server copy, usually because that copy holds its state in memory.
In more detail
It works against scaling and failover; storing state in a shared store and keeping requests stateless avoids needing it. It is usually implemented with a cookie the load balancer sets.
Related terms
- load balancer — A server that spreads incoming requests across several copies of a service so no single copy is overloaded.
- stateless — Describes a component or service that keeps no data from one request to the next, so each request carries everything needed to handle it.
- session — A record the server keeps about a logged-in caller, found on each request through a handle the client presents, usually in a cookie.
- stateless process — A process that keeps nothing it needs between requests in its own memory or disk, so it can be restarted or replaced at any moment.
- load balancing — Spreading requests or connections across several backend servers so no single one is overloaded and failed ones can be avoided.
- consistent hashing — A way of mapping keys to servers on a ring so that adding or removing a server moves only a small share of keys.
- hot key — A single key that receives a large share of all traffic, such as a celebrity account or a popular event.
- read your writes — A guarantee that after you make a change, your own later reads will include it.
Taught in
- The REST Constraints — Modern API Architecture: REST, GraphQL & gRPC
- Build, Release, Run And Processes — DevOps & Site Reliability Engineering
- Eventual Consistency And What It Costs A Product — Scalable System Design & Distributed Architecture
- Load Balancing And The Failure Modes It Introduces — Scalable System Design & Distributed Architecture
- Capacity Planning As A Design Input — Scalable System Design & Distributed Architecture
- Worked Design One: Scaling The Ticket Booking System — Scalable System Design & Distributed Architecture