Interview Prep/Networking/Load Balancing, Proxies & CDN

What are sticky sessions and why would you avoid them?

BeginnerScenarioLoad Balancing, Proxies & CDN
Answer

Situation read → Stickiness pins a client to one backend, usually via a cookie.

What I'd do →

  1. ALB stickiness uses AWSALB cookie, enabled per target group with stickiness.enabled=true
  2. Use only if the app keeps session state in memory
  3. Better: move session state to Redis or use signed JWTs so any node can serve any request
  4. Without stickiness, scaling in and rolling deployments are smooth

Why → Stickiness leads to uneven load and lost sessions when a node dies.

Interview tip → Say stateless services are the real answer; stickiness is a tactical workaround.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & CDN