Losing state

Many websites want to give a personalized stateful experience to users. For example, they will keep users authenticated via cookies (for a limited duration), and also manage their preferences there. But, sometimes, this state tends to creep into the backend services. The system remembers what happened last in objects called sessions. These are server-side blobs of information that want to persist throughout the user's interaction with the application. The session serves as a context for further requests. With increasing requirements, a lot of state tends to be stuffed into session objects, and low-latency access to this becomes mandatory.

A common pattern for this is to keep the session state locally on servers and have the load ...

Get Hands-On Software Architecture with Golang now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.