Giter Club home page Giter Club logo

clusterbench's Introduction

ClusterBench

Build Status

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.

Building

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

Output files:

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

Deploying

JBoss AS 7 / WildFly 8 and newer

Copy clusterbench-ee7.ear (or 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 deploy command:

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

JBoss AS 5

Copy clusterbench-ee5.ear to your server's deploy directory, e.g.:

$ cp clusterbench-ee5.ear ~/jboss-5.0.0/server/all/deploy/

Live Demo

You can try a demo running for free on OpenShift by Red Hat:

http://clusterbench-rhv.rhcloud.com/clusterbench/

Please do not benchmark this instance!

Scenario Servlets

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 text/plain response. 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.

HttpSessionServlet

/clusterbench/session

The 'default' servlet. Stores serial number and data in SerialBean object (POJO) which is directly stored in javax.servlet.http.HttpSession.

CdiServlet

/clusterbench/cdi

Stores a serial number in @SessionScoped bean.

LocalEjbServlet

/clusterbench/ejbservlet

Stores serial and data in @Stateful EJB Session bean (SFSB). The EJB is then invoked on every request.

GranularSessionServlet

/clusterbench-granular/granular

Stores serial number and data separately and are both directly put to javax.servlet.http.HttpSession. The byte array is never changed therefore this can be used to test effectiveness of using granular session replication.

Load Servlets

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.

MemoryUsageServlet

/clusterbench/memoryusage?milliseconds=10000&megabytes=500

Servlet simulating memory usage of the Java Virtual Machine (JVM). Parameters are milliseconds (duration) and megabytes.

AverageSystemLoadServlet

/clusterbench/averagesystemload?milliseconds=10000&threads=4

Servlet simulating CPU load of the cluster node. Parameters are milliseconds (duration) and threads.

Issues

Create them on GitHub Issues:

https://github.com/clusterbench/clusterbench/issues

Contributing

Contributions are welcome! Submit pull requests against the upstream repository on GitHub. Please follow the coding standards to keep the application simple and clean.

https://github.com/clusterbench/clusterbench

License

Project is licensed under Apache License Version 2.0.

Happy benchmarking!

clusterbench's People

Contributors

karm avatar ladicek avatar pskopek avatar rhusar avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

clusterbench's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.