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

Use async backpressure instead of MaxSlotsExceeded error #1374

Closed
nazar-pc opened this issue May 23, 2024 · 1 comment · Fixed by #1377
Closed

Use async backpressure instead of MaxSlotsExceeded error #1374

nazar-pc opened this issue May 23, 2024 · 1 comment · Fixed by #1377

Comments

@nazar-pc
Copy link

Currently library has an annoying behavior where exceeding max number of requests returns an error immediately.

I would have expected for it to be delayed until request can be made and user can cancel request before it goes out. Current behavior would be something like try_request() instead.

This can be achieved with a semaphore internally before trying to do anything.

Without this capability we are forced to add semaphore on application level even though we have already configured number of concurrent requests on the client level.

@niklasad1
Copy link
Member

niklasad1 commented May 23, 2024

Right,

I think we can adjust this limit to only configure the bounded channel instead for backpressure only and let user handle slow calls etc such as utilizing the timeouts.

I don't remember why I added that but backpressure makes more sense to me here and supporting try_request() may be an option but not sure.

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

Successfully merging a pull request may close this issue.

2 participants