Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Balancing the same context for different applications


A large enterprise environment might be composed of several application servers providing lots of applications. Sometimes, it happens that applications have the same context path while running on different nodes (eventually, even different server-groups in the case of WildFly in the domain mode), but they share the same balancer, that is, Apache.

In this recipe, we will learn how to balance the same application context coming from different applications from different nodes.

Getting ready

For this recipe, we will need an application named balancing-test, that you can find in my GitHub repository. If you skipped the Managing applications using the deployments folder recipe in Chapter 2, Running WildFly in Standalone Mode, please refer to it to download all the source code and projects that you will need.

To build the application, give the following commands:

$ cd ~/WFC/github/wildfly-cookbook
$ cd balancing-test
$ mvn clean package

How to do...