Book Image

Java EE 7 Development with WildFly

Book Image

Java EE 7 Development with WildFly

Overview of this book

Table of Contents (21 chapters)
Java EE 7 Development with WildFly
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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 choices available in order to achieve load balancing of your HTTP requests. You can opt for a hardware load balancer that sits in front of your cluster of servers or you can choose from the many available software solutions for WildFly...