vsukharev / java-backend-performance-test

A performance test for the following backend RESTFull API + Java Microservices alternatives: Grizzly, Spring Boot + embedded tomcat and Payara Micro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java-backend-performance-test

A performance test for the following backend RESTFull API + Java Microservices alternatives: Grizzly, Spring Boot + embedded tomcat and Payara Micro. All the 3 implementations are based on Jersey.

This is the repository that contains the implementation for the performance test commented in my blog in the following post:

Java Microservices: what is the way to go

About the directories structure:

In the 'simulation' directory, you can find the Gatling (htt://gatling.io) load test script and result directory, which contains the results produced during my test.

Each server implementation has its own directory and project. It uses Gradle and you can open / import it on Intelij (I used the community edition).

In order for running the servers and test:

Make sure you have in your environment:

  • A JVM 1.8 or higher installed and the JAVA_HOME properly set
  • Gatling 2.3 or higher installed and properly set on your path
  • Linux file descriptors and ephemeral TCP/IP port range properly set (take a look at the blog post mentioned above for more details)
  • No other server running on port 8080

Recommended (not strictly necessary):

  • Gradle 4.6 installed

Building, running and testing:

Grizzly

In a console, from the directory "jersey-grizzly":

./gradlew build
java -jar build/libs/jersey-grizzly-backend.jar

In another console window, from the repository root folder (running the test):

gatling.sh -rf simulation/results -sf simulation/

Confirm twice with "enter". The results of your test will be found in the "simulation/results" directory.

Payara Micro

In a console, from the directory "jersey-payara-micro":

./gradlew build
java -jar extlibs/payara-micro-5.181.jar --deploy build/libs/jersey-payara-micro-backend.war

In another console window, from the repository root folder (running the test):

gatling.sh -rf simulation/results -sf simulation/

Confirm twice with "enter". The results of your test will be found in the "simulation/results" directory.

Spring Boot

In a console, from the directory "jersey-spring-boot":

./gradlew build
java -jar build/libs/jersey-spring-boot-backend.jar

In another console window, from the repository root folder (running the test):

gatling.sh -rf simulation/results -sf simulation/

Confirm twice with "enter". The results of your test will be found in the "simulation/results" directory.

About

A performance test for the following backend RESTFull API + Java Microservices alternatives: Grizzly, Spring Boot + embedded tomcat and Payara Micro


Languages

Language:HTML 77.0%Language:JavaScript 13.3%Language:CSS 8.5%Language:Java 1.1%Language:Scala 0.1%