All Projects → clusterbench → clusterbench

clusterbench / clusterbench

Licence: Apache-2.0 license
Jakarta EE 5/6/7/8/10 WildFly/JBoss EAP Clustering Benchmark Application

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to clusterbench

jcliff
Manage JBossAS 7/EAP6/Wildfly with modular configuration files from command line, puppet, ansible, chef, etc.
Stars: ✭ 42 (+55.56%)
Mutual labels:  wildfly, jboss
Javaee7 Samples
Java EE 7 Samples
Stars: ✭ 2,470 (+9048.15%)
Mutual labels:  servlet, jboss
migrate-Java-EE-app-to-azure
Migrate an existing Java EE workload to Azure
Stars: ✭ 12 (-55.56%)
Mutual labels:  wildfly, jboss
wildfly exporter
A prometheus exporter for Jboss Wildfly
Stars: ✭ 19 (-29.63%)
Mutual labels:  wildfly, jboss
Servlet 3.1 Specification
JSR 340: Java Servlet 3.1 Specification 《Java Servlet 3.1 规范》中文翻译及示例。
Stars: ✭ 137 (+407.41%)
Mutual labels:  servlet
Hrrs
Record, transform, and replay HTTP requests in Java EE and Spring applications.
Stars: ✭ 54 (+100%)
Mutual labels:  servlet
Warbler
Warbler chirpily constructs .war files of your Ruby applications.
Stars: ✭ 850 (+3048.15%)
Mutual labels:  servlet
Latke
🌀 一款以 JSON 为主的 Java Web 框架。
Stars: ✭ 781 (+2792.59%)
Mutual labels:  servlet
Java Interview Questions
1000+ Java Interview Questions
Stars: ✭ 212 (+685.19%)
Mutual labels:  servlet
Pepper Metrics
pepper metrics is a tool, it can helps you collect runtime performance use RED method, and then output as log / timeseries data, by default it use prometheus as datasource, grafana as UI
Stars: ✭ 119 (+340.74%)
Mutual labels:  servlet
Java Interview
At the beginning, it was the repository with questions from Java interviews. Currently, it's more like knowledge base with useful links.
Stars: ✭ 114 (+322.22%)
Mutual labels:  servlet
Tus Java Server
Library to receive tus v1.0.0 file uploads in a Java server environment
Stars: ✭ 64 (+137.04%)
Mutual labels:  servlet
Spring Boot Examples
个人学习 SpringBoot2.x 写的一些示例程序,目前正在持续更新中.....
Stars: ✭ 159 (+488.89%)
Mutual labels:  servlet
Qtwebapp
QtWebApp is a HTTP server like Java servlets, written in C++ with the Qt framework.
Stars: ✭ 50 (+85.19%)
Mutual labels:  servlet
Javastud
Official, Main: This is Core/Advance java example series project. It help to learn java step by step using pdf tutorial provided here and corresponding demo project for the eclipse. Tag: Java Student, Java Stud, Stud Java, StudJava, Java Teachers, Studs Quick Start Guide, Studs Java, Object Oriented Programming, Core Java, Java SE, Java EE, Java Enterprise Edition, Java Blog, Java Articles, Java Web, JSP, Servlet, Maven, Spring, Hibernate, Spring-boot, Spring MVC Web, Angular JS, Angular 2, Java Security, Java CRUD, Java Login Example, File Handling, Multi threading, exception handling, Collection classes, Swing, Database, Date Time, Joda Time, JPA.
Stars: ✭ 220 (+714.81%)
Mutual labels:  servlet
Servletjsptutorial
《Servlet & JSP 技術手冊 - 從 Servlet 到 Spring Boot》相關資源
Stars: ✭ 25 (-7.41%)
Mutual labels:  servlet
Mytwitter
一个模仿Twitter的Java Web项目(基于原生的Servlet)
Stars: ✭ 175 (+548.15%)
Mutual labels:  servlet
Tarena Java Textbooks
达内 Java 全套教材
Stars: ✭ 75 (+177.78%)
Mutual labels:  servlet
Learning Servlet
🐸🔫 老年人的Servlet代码
Stars: ✭ 68 (+151.85%)
Mutual labels:  servlet
Estore
Java 语言实现的 苹果网上商城 ,前端模仿 苹果爱否 商城的页面 ,后端运用纯 Servlet + JSP +c3p0 数据库连接池以及web 相关技术,实现的基础功能包括前后台、实现展示首页、管理商品页面、商品分类、添加购物车、购买、提交订单 、联系客服等 ,欢迎 star,谢谢!!!
Stars: ✭ 129 (+377.78%)
Mutual labels:  servlet

ClusterBench

CI Version

ClusterBench is a simple application that can be deployed in a cluster of 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.

Support Matrix

Branch WildFly Version EE Version(s) Base JDK
main 28 Jakarta EE 10 11
4.x 27 Jakarta EE 10 11
3.x 26 (and previous) Java EE 5, EE 6, EE 7, EE 8 8

Building

Clone the Git repository first and switch to its directory:

$ git clone https://github.com/clusterbench/clusterbench.git

Build the default main branch to build the latest Jakarta EE 10 version:

$ mvn clean install

Output files:

./clusterbench-ee10-ear/target/clusterbench-ee10.ear

Running

You can also use wildfly-maven-plugin to run a container with the project already deployed. It will also provision the server without having to download anything manually.

$ mvn clean wildfly:run

and navigate your browser to http://localhost:8080/clusterbench/.

Deploying

WildFly

You can use the deploy goal 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-ee10.ear to server's deployments directory and start the standalone server in the HA mode:

$ cd ~/wildfly-28.0.0.Beta1
$ cp ~/clusterbench/clusterbench-ee10-ear/target/clusterbench-ee10.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-28.0.0.Beta1
$ ./bin/standalone.sh -c standalone-ha.xml

Then connect with the CLI:

$ ./bin/jboss-cli.sh -c
[standalone@localhost:9990 /] deploy ~/clusterbench/clusterbench-ee10-ear/target/clusterbench-ee10.ear

If you prefer GUI, you can start the server and navigate to http://localhost:9990/ and follow the instructions.

Tomcat

To deploy the Tomcat variant of clusterbench, copy the following war file into Tomcat installation webapps/ directory:

$ cp ~/clusterbench-ee10-web/target/clusterbench-ee10-web-tomcat.war webapps/

Note that CDI, debug, EJB, granular, JSF servlets are unsupported on Tomcat and not bundled in the war.

Deploying to OpenShift

Using Helm Charts

First, make sure you have oc and helm installed. Now, log into OpenShift using the following replacing with your token and server address:

oc login --token=sha256~<your_token> --server=https://api.sandbox-m3.1530.p1.openshiftapps.com:6443

First add the WildFly helm repo:

helm repo add wildfly https://docs.wildfly.org/wildfly-charts/

Now install the helm chart:

helm install clusterbench-from-chart -f charts/helm.yaml wildfly/wildfly

You can watch the build using oc:

oc get build -w

Once built, watch the deployment using:

oc get deployment clusterbench-from-chart -w

Once deployed, you can access the application for example the debug servlet using curl:

[rhusar@ribera clusterbench]$ curl https://$(oc get route clusterbench-from-chart --template='{{ .spec.host }}')/clusterbench/debug
...
Serial: 0
Session ID: nPw9NzEmPaZHlj0eYoCapZfBBOnNk_5HXNpq2Qi_
Current time: Wed Mar 22 14:36:52 GMT 2023

Once finished, remove everything using:

helm uninstall clusterbench-from-chart

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 jakarta.servlet.http.HttpSession.

CdiServlet

/clusterbench/cdi

Stores a serial number in @SessionScoped bean.

LocalEjbServlet

/clusterbench/ejbservlet

Stores serial and data in @jakarta.ejb.Stateful Jakarta Enterprise Bean (SFSB). The JEB is then invoked on every request.

GranularSessionServlet

/clusterbench-granular/granular

Stores serial number and data separately and are both directly put to jakarta.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.

AverageSystemLoadServlet

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

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

Custom Build Profiles

There a several profiles to test specific scenarios where the standard build needs to be modified.

shared-sessions

This profile produces a build to tests a shared sessions scenario where two WARs in the same EAR share HTTP sessions:

$ mvn install -P shared-sessions -DskipTests

singleton-deployment-specific-descriptor (using singleton-deployment.xml):

This profile produces a build to tests a singleton deployment scenario where one EAR guaranteed to be active on a single node at a time:

$ mvn install -P singleton-deployment-specific-descriptor -DskipTests

NOTE: this version uses descriptor singleton-deployment.xml to achieve singleton-deployment functionality

singleton-deployment-jboss-all (using jboss-all.xml):

This profile produces a build to tests a singleton deployment scenario where one EAR guaranteed to be active on a single node at a time:

$ mvn install -P singleton-deployment-jboss-all -DskipTests

NOTE: this version uses descriptor jboss-all.xml to achieve singleton-deployment functionality

webapp-offload

Uses distributable-web.xml inside WAR files, to define the WAR's profile to be used (EAP7-1072).

$ mvn clean install -P webapp-offload -DskipTests

webapp-offload-ref

The distributable-web.xml inside WAR files, references existing "sm_offload" and "sm_offload_granular" profiles on the server; Those profiles must be created on the server e.g. with some cli script (EAP7-1072).

$ mvn clean install -P webapp-offload-ref -DskipTests

resources-offload

Uses jboss-all.xml inside WAR files, to define the WAR's profile to be used (EAP7-1072).

$ mvn clean install -P resources-offload -DskipTests

resources-offload-ref

The jboss-all.xml inside WAR files, references existing "sm_offload" and "sm_offload_granular" profiles on the server; Those profiles must be created on the server e.g. with some cli script (EAP7-1072).

$ mvn clean install -P resources-offload-ref -DskipTests

short-names

Used in order to shorten name of bundled JARs and WARs within the final EAR file. Usually used in database tests to produce database tables with short names. Can be used in conjunction with any of the above webapp-offload, webapp-offload-ref, resources-offload, resources-offload-ref profiles.

$ mvn clean install -P webapp-offload,short-names -DskipTests
$ mvn clean install -P webapp-offload-ref,short-names -DskipTests
$ mvn clean install -P resources-offload,short-names -DskipTests
$ mvn clean install -P resources-offload-ref,short-names -DskipTests

sso-form

This profile enables form authentication:

$ mvn clean install -P sso-form -DskipTests

2clusters

This profile adds the necessary JEBs to perform call forwarding to a second JEB cluster:

$ mvn clean install -P 2clusters -DskipTests

Configuration

The default payload size can be overridden by a system property specifying integer number of bytes to use in a payload:

$ ./bin/standalone.sh -c standalone-ha.xml -Dorg.jboss.test.clusterbench.cargokb=5

NOTE: Ensure identical value is specified for all containers in the cluster!

Issues

File new issues using 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!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].