Prioritization justice: lessons from making background jobs fair at scale
summary
Background job fairness matters when greedy tenants cause long tail latency; four concrete strategies compare tradeoffs: shuffle sharding splits work cheaply but can underutilize, interruptible iteration slices large jobs to avoid blocking, and throttling uses a leaky bucket to spill excess into slow queues. A central arbiter with a per-tenant ledger routes batches and proves practical for heavy IO work (AI workflows, data imports). Prototype gem Sidekick Fair Play targets Sidekick + Redis/Postgres and is reported to scale on a real project.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 3:21Latency breaks fairness
- 6:11Fairness importance
- 7:14Per-tenant queues challenges
- 11:08Four fair job strategies
- 13:14Shuffling to reduce risks
- 15:19Interruptible iteration
- 17:29Throttling with leaky bucket
- 18:36Fairness manager approach
- 22:32Choosing the right strategy
- 23:55Resources
- 25:43Closing
related talks
30mBuilding Scalable & Resilient Background Jobs for FinTech
31mLessons Learned Running Sidekiq at Scale
23mLook Ma, No Background Jobs: A Peek into the Async Future
30mACIDic Jobs: Scaling a resilient jobs layer
11mRunning Jobs at Scale
22mRuby's Scheduler: Improving I/O
39mHacking Sidekiq for Fun and Profit
28mAcidic Jobs: A Layman's Guide to Job Bliss
