Aws-sdk-java-v2 performance testing

But the new SDK is built on Netty to support true nonblocking I/O.

In this article, we will compare how old and new SDKs work with a reactive microservice based on Spring WebFlux.

What will we compare?

· Real performance RPS under different load. We will use JMeter for performance test

What AWS service will we use for testing?

I would like to start with the most useful, powerful and cheap service SNS https://aws.amazon.com/sns/.

Java source code

All the code you can see in my GitHub

public interface SNSService {

CompletableFuture<Boolean> sendMessage(String message);

}

What do you need to start the service?

To start the service you need :

Swagger

I guess everybody knows Swagger and I also introduced it to this test project. There is one problem with Spring WebFlux and Swagger: there is still no release version of spring-fox 3.0.0 you can track the progress here

Let’s start with the old SDK

For sns.max.connection=200

Load scenario: 500 concurrent clients, 60 iterations
Result for old SDK for concurrent runing request= 200
Result for old SDK for concurrent running request= 200. SNS Async client from the old SDK created 200 threads, CPU is about 30%. Heap size is 710 MB

New SDK

For sns.max.connection=200

Result for new SDK for sns.max.connection= 200
SNS Async client from new SDK created only 20 threads, CPU is about 30%. Heap size is about 360 MB

Let’s increase sns.max.connection to 1000

Performance test scenario
Result for new SDK for sns.max.connection= 1000
SNS Async client from old SDK created 1000 threads, CPU is about 80%. Max size is about 1522 MB
Result for new SDK for sns.max.connection= 1000
SNS Async client from new SDK created only 20 threads, CPU is about 80%. Heap size is about 433 MB. All the same as for previous test

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store