Thanks for the thoughtful addition—great point about how serverless and edge architectures are reshaping session strategies. I agree that token-based approaches like JWTs help avoid affinity issues, though they introduce their own tradeoffs.
On affinity, I generally find cookie-based more reliable than source IP, especially given NAT and IP churn in real-world traffic. Ultimately, though, moving toward stateless or shared-session designs tends to be the more scalable direction.
Archit Mittal
I Automate Chaos — AI workflows, n8n, Claude, and open-source automation for businesses. Turning repetitive work into one-click systems.
Clean explanation of a concept that trips up a lot of developers when they first move from single-server to load-balanced architectures. The cart example is perfect — nothing frustrates users more than losing their session state mid-checkout. One thing worth adding: with the rise of serverless and edge computing, session persistence strategies are evolving again. Token-based approaches with JWTs stored client-side avoid the sticky session problem entirely, though they come with their own tradeoffs around token size and revocation. What's your take on cookie-based affinity vs source IP-based for most production setups?