A new Rails 8.1 app ships with Solid Queue; when would you still choose Sidekiq for background jobs, and what do you give up?
answer
- Redis vs the SQL database
- built-in retries vs retry_on only
- throughput and per-job latency
- crash handling of in-flight jobs
- Mission Control vs Sidekiq::Web
basics
~20 sChoose Sidekiq when job volume or latency outgrows a database-backed queue, when Redis already runs, or when you want its automatic retries, dead set and Web UI. You give up Solid Queue's no-Redis setup, recurring.yml and concurrency limits, and Mission Control.
solid answer
~50 sRails 8 apps get Solid Queue: jobs are rows in a SQL database, workers claim them with `FOR UPDATE SKIP LOCKED`, and there is nothing else to run or back up. Sidekiq keeps jobs in Redis and its threads block on Redis for the next job, so it handles very high job rates with low pickup latency and puts little load on the main database. It also brings automatic retries with backoff, a dead set and a mature Web UI. So pick Sidekiq when thousands of jobs per second or sub-second pickup matter, when Redis is already operated well, or when the team relies on its tooling. The costs: another stateful service to run and secure, Solid Queue's built-ins (`config/recurring.yml`, `limits_concurrency`) to replace, Mission Control Jobs not supporting it, and, in the open-source edition, in-flight jobs lost if a process is killed outright.
go deeper
Know that Rails 8 apps default to Solid Queue in the database, and that Sidekiq is a Redis-backed alternative you select with one Active Job setting.
Compare the two concretely: storage, fetching, retries and failed jobs, recurring jobs, concurrency limits and dashboards.
Argue the choice from measured volume, pickup latency and database load, and plan the migration of schedules, retry policies and monitoring.
Weigh operational surface against throughput: one fewer stateful service and SQL-visible jobs versus Redis speed and a commercial upgrade path.
## What a new app gets Since Rails 8.0, `rails new` adds the `solid_queue` gem, and its installer points production at it: `config.active_job.queue_adapter = :solid_queue` plus a separate `queue` database. **Solid Queue** stores jobs as rows in SQL tables (SQLite, PostgreSQL or MySQL). Workers poll for ready rows and claim them with `FOR UPDATE SKIP LOCKED` where the database supports it, so many workers can fetch at once without blocking each other. The pitch is fewer moving parts: no Redis, and job data lives in a database you already back up. **Sidekiq** is the long-established alternative: jobs are JSON payloads in **Redis** lists, and each worker thread blocks on Redis waiting for the next one. Both plug into Active Job, so switching is a configuration change for `ApplicationJob` classes. ## Side by side | Concern | Solid Queue | Sidekiq (open source) | |---|---|---| | Storage | SQL tables, often a separate queue database | Redis 7.0+ (or Valkey, Dragonfly) | | Extra infrastructure | none beyond the database | a Redis server to run, secure and monitor | | Fetching | polling with `FOR UPDATE SKIP LOCKED` | blocking pop, no polling of ready queues | | Automatic retries | none; jobs use Active Job `retry_on` | 25 retries with backoff by default | | Failed jobs | rows in `solid_queue_failed_executions` | dead set, capped at 10,000 jobs and six months | | Worker killed outright | in-flight jobs marked failed for inspection | in-flight jobs are gone from Redis | | Recurring jobs | `config/recurring.yml` built in | not in the open-source gem | | Per-key concurrency limits | `limits_concurrency` built in | none; capsules only cap whole queues | | Dashboard | Mission Control Jobs | `Sidekiq::Web`, Mission Control does not support it | Two rows deserve a note. On a hard kill, Sidekiq's basic fetch has already removed the job from Redis, and only a graceful shutdown pushes unfinished jobs back; reliable fetching is a feature of the commercial Sidekiq Pro. Periodic jobs, unique jobs and rate limiting likewise live in Sidekiq Enterprise rather than the open-source gem. ## When Sidekiq is the better fit 1. **Volume.** Tens of thousands of small jobs per minute, such as a stock-photo site generating several thumbnail sizes for every upload, put insert, update and delete traffic on the jobs tables. Redis absorbs that cheaply and keeps it off the primary database. 2. **Pickup latency.** A blocked Redis pop returns as soon as a job is pushed; polling adds up to one interval of delay per worker. 3. **Redis is already there.** If the team already runs Redis for caching or Action Cable and knows how to operate it, the main argument for Solid Queue, one less service, is weaker. 4. **Tooling and habits.** Automatic retries with a dead set, the Web UI's Busy and Retries tabs, and native `Sidekiq::Job` classes are familiar to many teams, and the commercial editions add batches, reliable fetch and rate limiters. ## When to stay on Solid Queue - Moderate job volume, where the database handles the extra rows without strain. - A small team that would rather not operate Redis at all. - Reliance on `config/recurring.yml`, `limits_concurrency` or Mission Control, which would need replacements. - A desire to keep jobs in SQL, where they can be queried, joined against and backed up like any other data. When the queue tables share the application's database, a job enqueued inside a transaction is even rolled back with it. ## What switching involves - Add the `sidekiq` gem, set `config.active_job.queue_adapter = :sidekiq`, and run `bundle exec sidekiq` where `bin/jobs` used to run. - Move schedules out of `config/recurring.yml` and concurrency rules out of `limits_concurrency`. - Decide on retries: Sidekiq retries any job whose exception escapes, which may duplicate `retry_on` policies already written for Solid Queue. - Size Redis memory for queued payloads, the retry set and the dead set, and put it behind authentication. - Remove the `queue` database entry and `config.solid_queue.connects_to` only after the last Solid Queue job has drained; jobs already in its tables are not moved to Redis. - Mount `Sidekiq::Web` for the operators who used Mission Control, and agree who watches the dead set.
- A Solid Queue app moves to Sidekiq. What happens to jobs that already declare retry_on?They keep working: `retry_on` re-enqueues through whichever adapter is configured. But Sidekiq now also retries any exception that escapes `perform`, including one `retry_on` re-raises after its last attempt, so a job can get Active Job's attempts and then Sidekiq's 25 more. Decide on one layer per job, for example by lowering the Sidekiq retry count with `sidekiq_options`.
- Could a team keep Solid Queue and still use Mission Control and Sidekiq side by side?Active Job allows a different adapter per job class with `self.queue_adapter = :sidekiq`, so a high-volume class can move while the rest stay on Solid Queue. Mission Control Jobs then shows only the Solid Queue side, since it supports Solid Queue and Resque but not Sidekiq; Sidekiq jobs are watched in `Sidekiq::Web`.
- Saying Rails 8 removed Sidekiq support, so Solid Queue is mandatory
- Claiming Solid Queue retries failed jobs automatically like Sidekiq
- Believing Mission Control Jobs can manage Sidekiq queues
- Assuming open-source Sidekiq requeues jobs from a process killed with SIGKILL
- Thinking Solid Queue requires Redis for locking
Assumes Rails 8.1, where rails new installs Solid Queue and its installer sets the production adapter; Rails 8.0 introduced that default.