Solid Queue vs Sidekiq: How to Actually Decide (Rails 8)
Solid Queue vs Sidekiq isn't a throughput threshold — it's about where your complexity lives and whether your database can absorb the queue. A decision framework.
Moving slow or unreliable work off the request path is one of the highest-leverage decisions in a backend — and the moment that work runs in a queue, the reliability contract quietly changes. A background job does not run exactly once. It runs at least once: a deploy, a timeout, a retry, or a lost acknowledgement can re-run a job you thought had finished. That is not a flaw to configure away; it is the guarantee you are building on.
So the hard part was never enqueuing the work — it is what happens on the second run. Retries repeat side effects that already happened; two duplicate deliveries race the same record in parallel; a worker crashes mid-flight and strands the job. None of that is fixable at the queue layer, because the queue only knows about delivery, not about the charge, the email, or the row you actually care about. Correctness has to move down to the one component that can adjudicate a race under concurrency: the database.
This hub collects the deep dives on that idea — at-least-once delivery and why jobs run twice, idempotent workers keyed on stable identifiers, atomic claims and unique constraints that make duplicates impossible to persist, fencing tokens, reapers, and the failure modes that only ever show up in production. The thread running through all of it: the queue provides delivery; the database enforces correctness.
Start here
Sidekiq runs jobs at least once, so duplicates happen. The 5 windows where a job re-runs — and how to stop double-charges with idempotent workers.
More articles
Solid Queue vs Sidekiq isn't a throughput threshold — it's about where your complexity lives and whether your database can absorb the queue. A decision framework.
Slow job? It either waited in the queue or ran slowly. Measure which with Sidekiq::
Solid Queue runs jobs on Postgres, not Redis. How the dispatcher, SKIP LOCKED claims, and polling actually work under the hood — and the trade-offs.
Sidekiq's default retry count, the backoff formula, and when to stop. Set retry intervals right — and skip jobs that can never succeed.
An LLM call behind a Sidekiq job runs at least once. Make workers idempotent so a retry never double-classifies — or double-bills your OpenAI calls.