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

Support for dynamic limits on concurrency #228

Open
nhorton opened this issue May 17, 2024 · 0 comments
Open

Support for dynamic limits on concurrency #228

nhorton opened this issue May 17, 2024 · 0 comments

Comments

@nhorton
Copy link

nhorton commented May 17, 2024

Right now, key generate accepts a callable, whereas the to setting for the limit is static.

It looks like it would be pretty easy to make that dynamic the same way that the key is.

Would you be open to a PR making that change?

2 notes:

  1. A good example motivating use case is SLAs. Premium customers get 2x the number of jobs allowed as standard customers. A second (the one we have) is that we call out to external databases of our customers, and those DBs have different capacity levels, so some could support 1000 jobs at once while some would fall over at 50.
  2. I know this could create an issue where the same key could have different limits set by different jobs. I would argue that is a "document and accept it" situation where developers can be warned that it should be the same value for any instances of the same key, and that otherwise the behavior is unpredictable.
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

No branches or pull requests

1 participant