Chapter 8. Developing Distributed Applications

In the previous chapters, we have all concentrated on building a stateless cluster. That means we don't need to maintain a session for each user request, and a load balancer can freely choose a worker node to serve the user requests.

A stateless cluster is more flexible and can scale well, so it's always the first choice when we are building a cluster. In essence, HTTP is a stateless protocol, so it lacks the ability to maintain a session for user requests. To solve this problem, web servers usually pass a session ID to the users' web browsers to maintain a long conversation.

For example, if we are building an online shopping system, we have to maintain a shopping cart for each user. When a user is ...

Get JBoss EAP6 High Availability now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.