Potential: Update ExpireJobCacheWorker to utilize new Sidekiq readonly database replicas capabilities
With the ability to Allow Sidekiq jobs to use readonly database replicas in place, the next step will be to enable this capability for this worker.
For more context, please check the following links,
- Slides: https://slides.com/nikolamilojevic/deck-eb7ff8/fullscreen
- A recorded Show and Tell introducing Sidekiq Load Balancing, https://youtu.be/PAJ8nvG1AGA
- Documentation(WIP): !59397 (merged)
- An example of shifting a Sidekiq worker to database replica: #324377 (closed)
Proposal
Use data_consistency :sticky
because it's the best trade-off. A data consistency delayed
could cause the job to be rescheduled if the replica hasn't caught up, but the worker is set to run with urgency :high
so we want to avoid that. A sticky
mode still allows us to use replica as much as possible.
Edited by Fabio Pitino