Coder Social home page Coder Social logo

spring_webflux_ssl_issue's Introduction

Description

This project shows a performance issue when using SSL with a Spring Webflux service with Reactor Netty.

Running the service

Create a Boot JAR first.

$ ./gradlew bootJar  

Build the Docker image.

$ docker build -t demo . 

And run it.

$ docker run -p 8081:8081 --cpus=1 --memory=2g -e SPRING_PROFILES_ACTIVE=dev demo

Performance test

On another shell, run Gatling, you can change the URL and the number of requests per seconds you want to achieve with Gatling.

$ URL=https://localhost:8081 REQUEST_PER_SECOND=100 ./gradlew gatlingRun 

The issue

  • The application.yml contains configuration for SSL with a self-signed certificate.
  • If SSL is disabled, the service is able to handle 150 requests per seconds without any issues.
  • When SSL is enabled, the Gatling test will fail after a few seconds with plenty of SSL handshake errors.
  • In order to get a clean run with SSL, we would need to lower the number of requests per second to 50.

NOTE: Numbers can vary slightly depending on your machine.

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.