-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
PoC: Redis Streams for immediate task delivery #492
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #492 +/- ##
==========================================
- Coverage 96.27% 94.67% -1.61%
==========================================
Files 11 12 +1
Lines 1074 1202 +128
Branches 209 218 +9
==========================================
+ Hits 1034 1138 +104
- Misses 19 36 +17
- Partials 21 28 +7
Continue to review full report in Codecov by Sentry.
|
This pull request introduces a proof of concept for using Redis Streams to improve immediate task delivery in ARQ. The current ARQ implementation faces significant scaling challenges, especially in high-load, distributed environments.
Current Problem:
When handling large volumes of small, quick tasks (e.g., 300 tasks/sec) across multiple workers (10-30+), ARQ’s task distribution model struggles with:
Proposed Solution:
This pull request explores how Redis Streams can be used for immediate task delivery to address these inefficiencies:
Backwards Compatibility (almost):
Key Benefits:
This PoC PR that demonstrates that this approach indeed possible and works. After sync with maintainers, this PR can be finished.
Benchmark results
They are not quite reliable as it was tested on a laptop with Redis in a Docker container. But here are some numbers:
Tasks with no delay
Current implementation
Redis streams implementation
Tasks with 1 second delay
Current implementation
Redis streams implementation