Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore acquisition scheduler offloading #217

Closed
mp911de opened this issue Oct 16, 2024 · 2 comments
Closed

Explore acquisition scheduler offloading #217

mp911de opened this issue Oct 16, 2024 · 2 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@mp911de
Copy link
Member

mp911de commented Oct 16, 2024

Reactor Pool uses a single-threaded acquisition method to dispatch pool allocation requests as the consequence of its non-blocking synchronization means. This can cause congestion on a single thread and negatively impact scalability.

We should explore whether we could obtain a Scheduler from a Connection in case it is Wrapped.

@mp911de mp911de added the type: enhancement A general enhancement label Oct 16, 2024
mp911de added a commit that referenced this issue Oct 16, 2024
[resolves #217]

Signed-off-by: Mark Paluch <mark.paluch@broadcom.com>
@mp911de mp911de self-assigned this Oct 16, 2024
@mp911de mp911de added this to the 1.0.2.RELEASE milestone Oct 16, 2024
@chemicL
Copy link

chemicL commented Oct 16, 2024

Thanks! Linking the original issue reactor/reactor-pool#247. I'll test this change and follow-up. It would be neat to offer a generic reactor-pool mechanism but this approach is still great if all the r2dbc drivers can take advantage of it as demonstrated in the postgresql case.

@chemicL
Copy link

chemicL commented Oct 16, 2024

I can confirm this change brings a scalability boost where all event loops are used evenly for the processing that follows an acquisition (either a new connection or re-use from the pool). And it also feels more aligned with the SPI of r2dbc (compared to an implicit contract in reactor-pool).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants