ClusterBench is a simple application that can be deployed in a cluster of JBoss AS 5 (EAP 5), JBoss AS 7 (EAP 6), WildFly 8 and newer. Once deployed it is easy to stress (using JMeter, curl, etc) and monitor the performance of the cluster while at the same time it can be easily checked the correctness of replicated sessions.
Clone the Git repository first and switch to the created directory:
$ git clone https://github.com/clusterbench/clusterbench.git
It comes in 3 flavors for Java EE 5, 6 and 7:
$ mvn install -Pee7 # default; requires JDK 7 or newer $ mvn install -Pee5,ee6,ee7 # builds everything; requires JDK 7 or newer $ mvn install -Pee6 $ mvn install -Pee5
./clusterbench-ee7-ear/target/clusterbench-ee7.ear ./clusterbench-ee6-ear/target/clusterbench-ee6.ear ./clusterbench-ee6-ear-passivating/target/clusterbench-ee6-passivating.ear ./clusterbench-ee5-ear/target/clusterbench-ee5.ear
JBoss AS 7 / WildFly 8 and newer
You can use the
deploy target of the WildFly Maven Plugin to deploy to your running instance by running:
$ mvn wildfly:deploy
which will deploy the resulting EAR to the running server.
To do this manually, copy
clusterbench-ee6.ear for AS 7) to server's deployments directory
and start the standalone server in the HA mode:
$ cd ~/wildfly-8.0.0.Final $ cp ~/clusterbench-ee6.ear standalone/deployments/ $ ./bin/standalone.sh -c standalone-ha.xml
You can also use the CLI to do so by starting the server, connecting with CLI and using
$ cd ~/wildfly-8.0.0.Final $ ./bin/standalone.sh -c standalone-ha.xml
Then connect with the CLI:
$ ./bin/jboss-cli.sh -c [standalone@localhost:9990 /] deploy ~/clusterbench-ee7.ear
If you prefer GUI, you can start the server and navigate to http://localhost:9990/ and follow the instructions.
To deploy the Tomcat variant of clusterbench, copy the following
war file into Tomcat installation
$ cp ~/clusterbench-ee7-web/target/clusterbench-ee7-web-tomcat.war webapps/
Note that CDI, debug, EJB, granular, JSF servlets are unsupported on Tomcat and not bundled in the
JBoss AS 5
clusterbench-ee5.ear to your server's deploy directory, e.g.:
$ cp clusterbench-ee5.ear ~/jboss-5.0.0/server/all/deploy/
You can try a demo running for free on OpenShift by Red Hat:
Please do not benchmark this instance!
Each servlet stresses a different replication logic, but they all produce the same reply:
number of times (integer) the servlet has been previously invoked within the existing session in a
In other words, the first request returns 0 and each following invocation returns number incremented by 1.
Furthermore, each HTTP session carries 4 KB of dummy session data in a byte array.
The 'default' servlet. Stores serial number and data in
SerialBean object (POJO) which is directly stored in
Stores a serial number in
Stores serial and data in
@Stateful EJB Session bean (SFSB). The EJB is then invoked on every request.
Stores serial number and data separately and are both directly put to
The byte array is never changed therefore this can be used to test effectiveness of using granular session replication.
There are also two oad generating Servlets for memory and CPU usage. These Servlets simulate load on the target system. These can be used to test the load-balancing mechanism of the reverse proxy.
Servlet simulating memory usage of the Java Virtual Machine (JVM). Parameters are
milliseconds (duration) and
Servlet simulating CPU load of the cluster node. Parameters are
milliseconds (duration) and
Create them on GitHub Issues:
Contributions are welcome! Submit pull requests against the upstream repository on GitHub. Please follow the coding standards to keep the application simple and clean.
Project is licensed under Apache License Version 2.0.