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

Allow runtime scaling of the number of workers #6341

Open
Noah-Kennedy opened this issue Feb 12, 2024 · 1 comment
Open

Allow runtime scaling of the number of workers #6341

Noah-Kennedy opened this issue Feb 12, 2024 · 1 comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-runtime Module: tokio/runtime

Comments

@Noah-Kennedy
Copy link
Contributor

Sometimes, it can be useful to be able to scale the amount of workers up or down.

For example, at Cloudflare we generally do graceful restarts by running both the old and new versions of a service at the same time and handing off the listener socket to the new version of the service, allowing the old one to keep running and serving traffic while the new one takes over. In cases like this, scaling down the number of workers on the old version of the service to limit it's resource usage can be a useful thing to do.

For this reason, I'm proposing allowing users to dynamically scale the number of worker threads they use at runtime up or down.

@Noah-Kennedy Noah-Kennedy added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Feb 12, 2024
@Noah-Kennedy
Copy link
Contributor Author

I think the first step here is to establish whether or not this is actually feasible - it may well not be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-runtime Module: tokio/runtime
Projects
None yet
Development

No branches or pull requests

2 participants