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

Request to Add Concurrency Limit Feature to Dio #2332

Closed
TheWalkingDead1024 opened this issue Nov 25, 2024 · 1 comment
Closed

Request to Add Concurrency Limit Feature to Dio #2332

TheWalkingDead1024 opened this issue Nov 25, 2024 · 1 comment
Labels
s: feature This issue indicates a feature request

Comments

@TheWalkingDead1024
Copy link

Request Statement

Hi Dio Team,

I'd like to request a feature that allows setting a limit on the number of concurrent HTTP requests in Dio. This would be useful for managing server load and complying with API rate limits.

Proposed Solution: Implement a configurable setting in the Dio package to control the number of simultaneous requests that can be made, possibly through a queue mechanism that holds excess requests until previous ones have completed.

Rationale: This feature would help prevent overloading servers and improve app performance by avoiding hitting rate limits set by external APIs.

Looking forward to your thoughts on this.

Best regards,

Solution Brainstorm

No response

@TheWalkingDead1024 TheWalkingDead1024 added the s: feature This issue indicates a feature request label Nov 25, 2024
@AlexV525
Copy link
Member

You can implementing this by a counter lock (or a mutex) + the interceptor. Every request requires a lock and each lock will be released when the request is done or error.

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: feature This issue indicates a feature request
Projects
None yet
Development

No branches or pull requests

2 participants