Web application clustering

Web application clustering involves two aspects: setting up an HTTP load balancer and telling WildFly to make the application's user sessions as HA. How to do the former depends on what load balancer you would choose (mod_cluster is our suggested choice—it is preconfigured and integrates with WildFly out of the box); the latter could not be simpler—just add the <distributable/>tag to your application's web.xml file. Whenever a node fails, the user's HTTP session will be handled by another one. If everything goes well, the end user will not know that there was a failure—everything will be handled behind the scenes.

Let's see how to action both these steps in concrete terms.

Load balancing your web applications

You have several ...

Get Java EE 7 Development with WildFly 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.