No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gatling
rest-api
sample-responses/i7-ubuntu
README.md
run-load-test.sh
sysinfo.sh

README.md

java-rest-api-web-container-benchmark

Are you wondering which web container to use for your nest Java REST API?

If your answer is yes, then you are not alone.

This project compares: Tomcat, Jetty, Grizzly and Undertow in term of serving JAX-RS responses

TO avoid any latency, the REST API does not try to access any backend service.

There are 3 blog entries supporting this benchmark:

##Setup To run this benchmark, you will need:

##Running load tests with default server configuration to run the test,

  • first start the API server by doing: ./gradlew -p <SERVER NAME> bootRun where <SERVER NAME> is one of grizzly, jetty, tomcat or undertow

  • then in a new console, do ./run-load-test.sh feel free to edit the script for for different load profile

##Changing server thread pool size and header One can easily change server thread pool size on the command line:

Note that it has been advised (Undertow folk) that we take as worker-thread 16*numberOfCores

In my case, we have 2 cores => workers=32

####Grizzly

./gradlew bootRun -p grizzly -Dserver.grizzly.worker-threads=32 -Dserver.server-header=TestServer

####Jetty

./gradlew bootRun -p jetty -Dserver.jetty.min-threads=32 -Dserver.jetty.max-threads=32 -Dserver.server-header=TestServer

####Tomcat

./gradlew bootRun -p tomcat -Dserver.tomcat.max-threads=32 -Dserver.server-header=TestServer

####Undertow

./gradlew bootRun -p undertow -Dserver.undertow.worker-threads=32 -Dserver.server-header=TestServer

#Actuator To enable spring boot actuator,please look in build.gradle for the comments /**To enable actuator...