Solid Queue: Background Tasks Without Redis
Welcome to the third article in the Solid Triumvirate series in Rails 8! Today we're talking about Solid Queue. The SOLUTION you'll wonder how you ever lived without for creating background tasks with ease.
- Send an automatic email? ✅ Check.
- As soon as a user signs up, Solid Queue takes over to send a welcome email without slowing down the HTTP response.
- Generate a PDF in the background? ✅ Check.
- Need a report or an invoice? The job is launched in the background, and the file is ready when the user returns.
- Synchronize data with an external API? ✅ Check.
- A profile update triggers a job that sends the information to a CRM or marketing tool.
- Clean up old sessions or temporary files? ✅ Check.
- A nightly scheduled job keeps your database clean and lean.
- Import a large CSV file? ✅ Check.
- The user uploads a file? Solid Queue processes it line by line without overloading the server.
- Schedule reminders or follow-ups? ✅ Check.
- Thanks to job scheduling, you can send a reminder 24 hours before an event.
You can do so many things that it can be dizzying! From installation to configuration to its use. Solid Queue will have no secrets left for you!
Don't hesitate to check out my other articles on the Solid Triumvirate topic—these will reveal all its secrets to you!
- "Solid Cache": No longer depending on Redis for Rails caching
- "Solid Cable": WebSockets and real-time features, simply and hassle-free
- "Solid Queue": Background tasks Rails-style (you're here)
- The Triumvirate applied to a complete project
Buckle up—it's going to be solid :)
Focus on Solid Queue
What is a Background Job?
Background jobs are tasks that take time and we don't want to execute during the user's HTTP request. Otherwise we would block the application or get a timeout error telling us that the server we queried took too long to respond.
- Classic examples:
- Send a welcome email after signup
- Generate a complex PDF report
- Process an uploaded image
- Synchronize data with an external API
Clean up old data
Without background jobs:
With background jobs:
Solid Queue: How does it work?
Solid Queue is a job management system based on your database, using Active Job (Rails' standard interface for background jobs).
Architecture
Solid Queue creates several tables in your database:
Key components
1. Workers (Workers) The workers are the processes that actually execute your jobs. They poll the solid_queue_ready_executions table regularly to find work.
2. Dispatchers (Dispatchers) The dispatchers move jobs from solid_queue_scheduled_executions to solid_queue_ready_executions when their execution time arrives.
3. Scheduler (Scheduler) The scheduler handles recurring tasks (like cron jobs).
The magic: FOR UPDATE SKIP LOCKED
Solid Queue uses an advanced SQL feature called FOR UPDATE SKIP LOCKED which allows multiple workers to read the same table concurrently without blocking each other.
- What happens:
- Worker 1 takes job A and locks it
- Worker 2 tries to take a job
- Instead of waiting for Worker 1 to finish (LOCKED), it skips job A (SKIP LOCKED) and takes job B
Result: zero blocking, maximum performance!
Installation and Configuration
On Rails 8
Solid Queue is enabled by default! Just check your configuration.
Configuration in config/solid_queue.yml
Practical Examples
Example 1: Simple Job - Send an Email
Example 2: Scheduled Job - Send Later
Example 3: Recurring Tasks (Cron Jobs)
Example 4: Job with Error Handling
Example 5: Concurrency Control
Solid Queue allows limiting how many jobs of a certain type can run concurrently.
Use case: If you have 10 reports to generate, only 3 will run in parallel. The other 7 will wait for a slot to free up.
Example 6: Job with Progress
Starting the Worker
In development
Rails 8 uses Puma with a Solid Queue plugin:
With bin/dev, everything starts automatically!
In production
Option 1: Separate process
Option 2: With Kamal/Docker
Option 3: Systemd
Mission Control: The Administration Interface

Rails 8 can use Mission Control - Jobs, a web interface for monitoring your jobs. It's incredibly handy, so I strongly recommend installing it if you use Solid Queue.
Installation
Configuration
Mission Control comes with basic HTTP authentication. Configuration is done via Rails credentials:
But if you use an authentication system like Devise, it's best to nest the Mission Control route behind, for example, an administrator role:
Of course, your user model should have a boolean column "admin" and an admin? method.
- Visit http://localhost:3000/jobs to see:
- Running jobs
- Failed jobs with stack traces
- Job history
- Performance statistics
Ability to retry failed jobs
Monitoring and Debugging
Check jobs in the console
Useful logs
|
Solid Queue vs Other Solutions
|
Solution
|
Speed
|
Features
|
Setup
|
|---|---|---|---|---|
|
Dependencies
|
Solid Queue
|
Good
|
Rich
|
Very simple
|
|
None
|
Sidekiq
|
Excellent
|
Very rich
|
Simple
|
|
Redis
|
GoodJob
|
Good
|
Rich
|
Simple
|
|
None
|
Resque
|
Average
|
Basic
|
Simple
|
|
Redis
|
DelayedJob
|
Slow
|
Basic
|
Very simple
|
None
- Use Solid Queue if:
- You are starting with Rails 8
- You want zero external dependencies
- Your needs are standard (80% of apps)
You have a few thousand jobs per hour
- Switch to Sidekiq if:
- You have tens of thousands of jobs per hour
- You need advanced features, such as async jobs
Performance is critical
- Consider GoodJob if:
- You want the benefits of Solid Queue
But with an even more advanced admin interface
Conclusion: Solid Queue, simplicity in the service of performance
Solid Queue marks a natural evolution in the Rails ecosystem: a solution for managing asynchronous jobs that focuses on simplicity, robustness, and native integration. No more external dependencies like Redis or Sidekiq: with an SQL database and minimalist configuration, Solid Queue lets you manage background tasks with elegance and efficiency.
Whether it's sending emails, generating reports, or orchestrating complex workflows, Solid Queue proves to be a reliable ally for Rails developers. And with Rails 8 integrating it by default, it's time to rethink how we design asynchronous processing.
