You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any possibility to make the zRangeByScore blocking?
I've implemented the AWS SQS-like queue equivalent with: zRangeByScore, zAdd, zRem, setex and `get. Unfortunately my workers needs to query Redis, e.g. each 100ms to get the results as soon as possible. This causes unnecessary stress to both application and Redis. Especially that I am running tens of queues. This solution doesn't scale. I would like to reduce time to retrieve item down to ~10ms and support hundreds of queues. This would case huge stress on both Redis and my application.
The zRangeByScore is the function used to retrieve the items that needs to be processed. If I manage to make it blocking, that would solve the problem.
Is there any possibility / way to introduce blocking zRangeByScore?
EDIT:
I think this was mentioned here: #2801 however the original author closed the issue since he found a solution / implemented Laravel
The text was updated successfully, but these errors were encountered:
tomekit
changed the title
Feature request: Blocking zRangeByScore for scalable queue system
Feature request: Blocking zRangeByScore to implement long-polling for scalable SQS-like queue system
Mar 6, 2019
I also need the functionality of a blocking ZRANGEBYSCORE.
BZPOPMIN will not work as the score is a timestamp and the current min may not have occurred yet.. unless I could add a maximum value limit to BZPOPMIN of the current time.
Is there any possibility to make the zRangeByScore blocking?
I've implemented the AWS SQS-like queue equivalent with:
zRangeByScore
,zAdd
,zRem
,setex
and `get. Unfortunately my workers needs to query Redis, e.g. each 100ms to get the results as soon as possible. This causes unnecessary stress to both application and Redis. Especially that I am running tens of queues. This solution doesn't scale. I would like to reduce time to retrieve item down to ~10ms and support hundreds of queues. This would case huge stress on both Redis and my application.The
zRangeByScore
is the function used to retrieve the items that needs to be processed. If I manage to make it blocking, that would solve the problem.Is there any possibility / way to introduce blocking
zRangeByScore
?This Gist might be useful for anyone that wants to have SQS-like equivalent using Redis:
https://gist.github.com/tomekit/676e93e67c0fe45d2d7f576bc0672542
EDIT:
I think this was mentioned here: #2801 however the original author closed the issue since he found a solution / implemented Laravel
The text was updated successfully, but these errors were encountered: