---
title: "Discussion on \"Java's reactive connection pooling performance caveat\" | Hashnode"
description: "Discussion on \"Java's reactive connection pooling performance caveat\". R2dbc is a great driver but it can sacrifice some performance.. for the sake of performance"
url: "https://hashnode.com/posts/javas-reactive-connection-pooling-performance-caveat/64a1d8e1e16902f78ec7f9a6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Java's reactive connection pooling performance caveat](https://piotrd.hashnode.dev/javas-reactive-connection-pooling-performance-caveat?utm_source=hashnode&utm_medium=feed)

R2dbc is a great driver but it can sacrifice some performance.. for the sake of performance

Jul 2, 2023 · 5 min read · piotrd.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#r2dbc](https://hashnode.com/tag/r2dbc)
-   [#reactor](https://hashnode.com/tag/reactor)
-   [#projectreactor](https://hashnode.com/tag/projectreactor)
-   [#r2dbc-pool](https://hashnode.com/tag/r2dbc-pool)

## Written by

[Piotr](https://hashnode.com/@PiDu)

@PiDu · Poland, Warsaw

  
[View profile](https://hashnode.com/@PiDu)

Passionate tech lover and Java developer

I have a background in Aerospace Engineering. My professional experience spans from shooting hypersonic rockets as a member of Student's Space associacion, through designing 3d models of parts for Aeroderived Gas Turbines and finally to working as an Space Surveillance Engineer. For past years I have been working as a Java developer and loved how powerful tool can it be.

## Responses 2

Markdown supported · ⌘↵ to post

[Luboš Račanský](https://hashnode.com/@banterCZ)

[Jun 13, 2025](https://hashnode.com/posts/javas-reactive-connection-pooling-performance-caveat/64a1d8e1e16902f78ec7f9a6/comment/684bd02c9f2ab4180aefb062)

Thanks for the post. I am trying to understand the situation. My first observation is that in 2025, the current Netty does not accept negative numbers, see github.com/reactor/reactor-netty/blob/main/reactor-netty-core/src/main/java/reactor/netty/resources/LoopResources.java#L136

[Luboš Račanský](https://hashnode.com/@banterCZ)

[Jun 13, 2025](https://hashnode.com/posts/javas-reactive-connection-pooling-performance-caveat/64a1d8e1e16902f78ec7f9a6/comment/684bd02c9f2ab4180aefb062#reply-684bff077ec3ace7cc2e796c)

Ahh, sorry, it is possible to pass -1, wrong line, the correct one is below github.com/reactor/reactor-netty/blame/main/reactor-netty-core/src/main/java/reactor/netty/resources/LoopResources.java#L172

[Min.K (Minkiu) Kim](https://hashnode.com/@mink)

[Sep 1, 2023](https://hashnode.com/posts/javas-reactive-connection-pooling-performance-caveat/64a1d8e1e16902f78ec7f9a6/comment/64f1517e052b196d0934cc4d)

Hi.

I tried raising the reactor-pool version to 1.0.1 and running tests.

If I do the runWithoutColocation test first and then the runWithColocation test, the runWithoutColocation test measures slower.

So it seems to be an effect of the order of the tests and not an effect of LoopResources.

[Piotr](https://hashnode.com/@PiDu)

[Sep 1, 2023](https://hashnode.com/posts/javas-reactive-connection-pooling-performance-caveat/64a1d8e1e16902f78ec7f9a6/comment/64f1517e052b196d0934cc4d#reply-64f1ee1b94e5c8763b3f70a4)

Hey, maybe I have not mentioned it but the tests were meant to be launched separately. I did not take much effort to properly isolate them. I guess when you launch them separately the results are reproducible right?
