Dynamic FIFO ordering per user using the Rate Limiter #5915
Unanswered
italotabatinga
asked this question in
Q&A
Replies: 1 comment
-
The only way you can guarantee execution ordering is:
If you create Job A, B, C, D and E at the same time, Sidekiq does not guarantee that ordering for execution. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a job that must be executed in the same order it was triggered in the scope of a user but can be executed out of order for different users. This job may be triggered dozens of times per user for thousands of users in a small amount of time.
Today we use Sidekiq Pro but we're considering using the Rate Limiting feature from Sidekiq Enterprise to solve this problem because it has the capability of running dynamic limiters (e.g.
"job-name-#{user_id}"
) with size 1.However, there's a case that we don't know how it would behave. Suppose we trigger 5 jobs for the same user, all of them are pushed to execution (aka processed), 1 is executing while the other 4 are waiting. The question is: can we guarantee that these 4 will be executed in the order they were triggered? Would they exit the lock in the same order they entered?
Solving this would help us a lot!
Beta Was this translation helpful? Give feedback.
All reactions