R2DBC vs JDBC performance

Test scenario

REST endpoints

  1. We will add for an empty user table 100.000 users (200 parallel JMeter users, 500 times)
  2. Select the user by id (200 parallel JMeter users, 500 times))
  3. Select the first 100 users(200 parallel JMeter users, 500 times))
  4. Delete 100.000 users(200 parallel JMeter users, 500 times)

Blocking Spring MVC and Spring Data JDBC + HikariCP

Reactive Spring WebFlux with Spring Data R2DBC and R2DBC-Pool

JVisualVM view for Select the first 100 users. No blocking threads

RESULT

Throughput(200 parallel JMeter users)
CPU utilization(200 parallel JMeter users)

Select top 100 slowness

R2DBC profile for top 100 users

Conclusion

--

--

--

Java, AWS expert

Love podcasts or audiobooks? Learn on the go with our new app.

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
Aleksandr Filichkin

Aleksandr Filichkin

Java, AWS expert

More from Medium

How To Manage Multi JAVA Versions On Mac

Application Performance Monitoring: Monitor dynamically java applications with Consul, Prometheus…

JAVA 16 And 17: Evolutions and new features — Part 1

OpenTracing with Jaeger (Auto Instrumentation)