MySQL R2DBC driver

475 views
Skip to first unread message

Siddharth Jain

unread,
Sep 12, 2022, 1:40:32 PM9/12/22
to r2dbc
Hello,

I am new to r2dbc and have couple of questions:
1. I see there are two options to choose a driver for MySQL. 
which of these is better?

2. Is r2dbc using one of the drivers above still the best way to make async calls to MySQL? 

3. I read some blogs posts saying there is basically no performance again when using r2dbc vs jdbc

what do people here think about that?

Sid

Mark Paluch

unread,
Sep 15, 2022, 9:26:15 AM9/15/22
to r2dbc
Hi Sid,

while the first driver (r2dbc-mysql) focuses primarily on the R2DBC spec, it's not really maintained anymore which is quite a pity. JAsync is well-maintained but it has less of a focus on R2DBC as it was built before R2DBC was there and so it is designed to be consumed directly.

Cheers,
Mark

Michael McMahon

unread,
Sep 15, 2022, 1:13:01 PM9/15/22
to r2dbc

I thought it was really great to see the detailed analysis.

One thing I noted is a connection pool size of 20, with 2 CPU cores. So that means the difference between JDBC and R2DBC will be 10 less threads blocked on each core. In my experience, I don't see much difference in performance at this scale.
But as the number of concurrent database calls grows, that's where R2DBC can shine. It's not a precise figure, but I seem to recall something like 32 concurrent database calls per core is where I would start to see a difference.
When discussing R2DBC, I think its good to clarify what we mean by "concurrency". A system could have 1000s of concurrent *web* requests, but R2DBC is only going to effect the *database* requests. In the blog, we see a large number of concurrent web requests, but that's all funneling down to a small number of concurrent database requests.

Anyway, I really like to see articles like this. I appreciate the scientific nature of creating a test, measuring the result, and then opening the conclusion up to peer review :)
Reply all
Reply to author
Forward
0 new messages