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.
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