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

We need to use an app_factory for tinysearchengine if we want to use multiple uvicorn workers #32

Open
nitred opened this issue Dec 31, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@nitred
Copy link
Contributor

nitred commented Dec 31, 2021

If we would like to use multiple uvicorn workers for production then we need to have an app factory that uvicorn can use to spawn multiple instances of the app, one for each worker. Usually a new process is spawned for each worker and the workers & processes don't share any state.

However the app factory must take the config or config filename as an argument if the app is to be configured by the user.

Relates to #30

@nitred
Copy link
Contributor Author

nitred commented Dec 31, 2021

I don't think this is a priority at the moment but if ever the server needs to be beefier, using multiple workers is the easiest way to increase the ability of the server to handle more requests.

@daoudclarke daoudclarke added the enhancement New feature or request label Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants