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

Reconsider number of threads long-polling redis #26

Open
olttwa opened this issue May 25, 2022 · 0 comments
Open

Reconsider number of threads long-polling redis #26

olttwa opened this issue May 25, 2022 · 0 comments
Assignees

Comments

@olttwa
Copy link
Member

olttwa commented May 25, 2022

Issue

Goose polls redis n times for n threads.
To reduce load on redis, we might want to consider polling from just 1 thread, and enqueuing jobs' execution to the threadpool. To limit execution parallelism/concurrency to the user config, we can have an in-memory buffered queue.

N worker instances with T threads polling means O(N*T) operations per second (or long-polling if #65 gets resolved) slamming Redis.

What next?

  • Benchmark 2 approaches:
    • Polling redis n times
    • Polling redis once

While benchmarking, measure 2 things:

  • time taken to complete 1000 jobs averaging 50ms execution time
  • redis memory/CPU consumption
@olttwa olttwa self-assigned this Jun 2, 2022
@olttwa olttwa changed the title Reconsider redis polling Reconsider number of threads long-polling redis Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant