Giter VIP home page Giter VIP logo

boot2-load-demo's Introduction

Spring Boot2 Performance Harness

This is a sample Spring Boot 2 app to demonstrate the raw performance difference between a Spring Boot 2 app vs a Spring Boot 1 app.

Backing Service

./gradlew -p applications/sample-load-target clean bootRun

Spring Boot 2 based app:

Run the Spring Boot 2 based app:

./gradlew -p applications/boot2-load-sample clean bootRun

Call target endpoint

Assuming that httpie is installed

http POST 'http://localhost:8082/passthrough/messages' id="1" payload="one"   delay="1000"

OR with CURL

curl -X "POST" "http://localhost:8082/passthrough/messages" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d $'{
  "id": "1",
  "payload": "one",
  "delay": "1000"
}'

Spring Boot 1 based app:

Run the Spring Boot 1 based app:

./gradlew -p applications/boot1-load-sample clean bootRun

Call target endpoint

Assuming that httpie is installed

http POST 'http://localhost:8081/passthrough/messages' id="1" payload="one"   delay="1000"

OR with CURL

curl -X "POST" "http://localhost:8081/passthrough/messages" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d $'{
  "id": "1",
  "payload": "one",
  "delay": "1000"
}'

Spring Cloud Gateway based app:

Run the app:

./gradlew -p applications/spring-cloud-gateway-sample clean bootRun

Call target endpoint

Assuming that httpie is installed

http POST 'http://localhost:8083/passthrough/messages' id="1" payload="one"   delay="1000"

OR with CURL

curl -X "POST" "http://localhost:8083/passthrough/messages" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d $'{
  "id": "1",
  "payload": "one",
  "delay": "1000"
}'

Spring Cloud Zuul based app:

Run the app:

./gradlew -p applications/zuul-sample clean bootRun

Call target endpoint

Assuming that httpie is installed

http POST 'http://localhost:8084/passthrough/messages' id="1" payload="one"   delay="1000"

OR with CURL

curl -X "POST" "http://localhost:8084/passthrough/messages" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d $'{
  "id": "1",
  "payload": "one",
  "delay": "1000"
}'

Zuul2 based app:

Run the app:

./gradlew -p applications/zuul2-sample clean run

Call target endpoint

Assuming that httpie is installed

http POST 'http://localhost:8085/passthrough/messages' id="1" payload="one"   delay="1000"

OR with CURL

curl -X "POST" "http://localhost:8085/passthrough/messages" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d $'{
  "id": "1",
  "payload": "one",
  "delay": "1000"
}'

Run Load tests

Against Boot 2 version of the app

./gradlew -p applications/load-scripts  -DTARGET_URL=http://localhost:8082 -DSIM_USERS=300 gatlingRun

Against Boot 1 version of the app

./gradlew -p applications/load-scripts  -DTARGET_URL=http://localhost:8081 -DSIM_USERS=300 gatlingRun

Against Spring Cloud Gateway version of the app

./gradlew -p applications/load-scripts  -DTARGET_URL=http://localhost:8083 -DSIM_USERS=300 gatlingRun

Against Spring Cloud Zuul version of the app

./gradlew -p applications/load-scripts  -DTARGET_URL=http://localhost:8084 -DSIM_USERS=300 gatlingRun

Against Zuul2 version of the app

./gradlew -p applications/load-scripts  -DTARGET_URL=http://localhost:8085 -DSIM_USERS=300 gatlingRun

boot2-load-demo's People

Contributors

bijukunjummen avatar spencergibb avatar

Watchers

 avatar

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.