In most articles author has come across on stateless and stateful services, stateful service architectures are viewed less favorably in contrast to stateless services primarily due to the horizontal scalability challenge they bring along. By Shivang.
Most web services we interact with in our day-to-day lives hold some degree of user state to function effectively, making them stateful. And how we manage the state on the backend ascertains the complexity involved in scaling the service.
Further in the article:
- What is user state?
- Managing user state in a cluster
- The node holding user state goes down
- Replicating user state to a distributed cache
- Storing user state in a database
- Leveraging both the database & the cache for storing user state
- Replication of user state across the cluster
- The stateful node handles requests for a set of users
.. and more. Sticky sessions enable the load balancer to route the user requests to the same cluster node handling that user’s requests. This approach is largely used with stateful applications, including legacy applications that have significant redesigning costs to make them stateless. Nice one!
[Read More]