config.reliable_scheduler!

366 views
Skip to first unread message

Martin Streicher

unread,
Nov 22, 2021, 8:50:39 AM11/22/21
to Sidekiq

We continue to refine our Sidekiq environment. A pending change is to enable the reliability features. 

Sidekiq::Client.reliable_push! unless Rails.env.test?

Sidekiq.configure_server do |config| 
  config.super_fetch! 
  config.reliable_scheduler! 
end

However, the disclaimer about the reliable scheduler gives us pause because we are using the sidekiq-unique-jobs gem, too. It says: 

"It does have the drawback that client-side middleware is not invoked when enqueuing the scheduled jobs, since the entire operation takes place within Redis."

Our interpretation: sidekiq-unique-jobs will likely break because it is implemented using client-side middleware to filter out duplicate jobs. 

Does anyone have experience with the reliable scheduler and the unique jobs gem? 

We are now running Sidekiq Enterprise, so it's conceivable we could replace the gem with SE's own job uniqueness feature -- but that is a question, too. Is the SE implementation of unique jobs affected by the reliable scheduler, too? 

Thanks for reading. 
Martin 

Mike Perham

unread,
Nov 22, 2021, 12:55:45 PM11/22/21
to sid...@googlegroups.com
Yes, that's one case where one feature overrides/disables another feature. If you use the reliable scheduler, there are cases where the unique feature will not work properly. There are other cases where it will still work: for one, scheduled jobs by default take a lock when they are scheduled and remove the lock after execution. In this case, the reliable scheduler does not need to take the lock (as it already exists in Redis).

--
You received this message because you are subscribed to the Google Groups "Sidekiq" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sidekiq+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/f5b8ac7f-1b4c-4eb9-a316-972d112bed27n%40googlegroups.com.


--
Mike Perham – CEO, Contributed Systems
Smart, effective open source infrastructure for your apps.
Reply all
Reply to author
Forward
0 new messages