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

feat(api): add support for multiple worker threads #208

Open
jordanshatford opened this issue Dec 5, 2023 · 0 comments
Open

feat(api): add support for multiple worker threads #208

jordanshatford opened this issue Dec 5, 2023 · 0 comments
Labels
enhancement New feature or request python Pull requests that update Python code

Comments

@jordanshatford
Copy link
Owner

jordanshatford commented Dec 5, 2023

Describe the problem

Right now the API on works when running with a single worker thread. This could cause slowdowns when there are many requests at once.

NOTE: When content is actually downloaded, a task is added to a thread pool to perform those actions. This thread pool is configured as None which will use the number of logical CPU's available. This means that only API requests could cause a bottleneck.

Describe the proposed solution

Update the API codebase to support multiple worker threads. This could be done by using some sort of shared memory, Redis cache, or database. Implementation does not really matter, assuming that it works and is not causing another bottleneck that is worse than current functionality.

Alternatives considered

N/A

Importance

nice to have

Additional information

This will require that the current session manager class is available for all worker thread. This is to ensure that one users session information is available if many worker threads are process different requests by that user. Without this we could see duplicate content requests, failed requests, etc.

@jordanshatford jordanshatford added the enhancement New feature or request label Dec 5, 2023
@jordanshatford jordanshatford added the python Pull requests that update Python code label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

1 participant