# rails/solid_queue

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/rails-solid-queue).**

2,443 stars · 242 forks · Ruby · MIT

## Links

- GitHub: https://github.com/rails/solid_queue
- awesome-repositories: https://awesome-repositories.com/repository/rails-solid-queue.md

## Description

Solid Queue is a background job processing system for Ruby on Rails applications that utilizes a relational database as its primary storage backend. By integrating directly with the framework's native job interface, it ensures that task queues and execution states are persisted within the database, providing reliability and recoverability across system failures.

The system distinguishes itself by embedding worker processes directly into the web server environment, which simplifies deployment and consolidates monitoring within existing infrastructure. It coordinates distributed worker processes through database-level locking and polling mechanisms, allowing for consistent job claims and execution across multiple instances.

Beyond basic task execution, the library provides tools for managing system resources through concurrency throttling, which restricts the number of simultaneous executions for specific task types. It also includes a built-in scheduler for recurring operations, allowing for the automation of periodic tasks using fixed time intervals. The system supports custom lifecycle hooks to manage resource initialization and connection cleanup during worker startup and shutdown.

## Tags

### Development Tools & Productivity

- [Relational Database Processors](https://awesome-repositories.com/f/development-tools-productivity/background-job-processors/relational-database-processors.md) — Provides a background job processing system that uses a relational database for reliable task persistence and recovery.
- [Background Worker Processes](https://awesome-repositories.com/f/development-tools-productivity/daemonized-process-execution/background-worker-processes.md) — Embeds background worker threads directly into the application server process to simplify infrastructure and share memory.

### DevOps & Infrastructure

- [Job Queues](https://awesome-repositories.com/f/devops-infrastructure/job-queues.md) — Provides a database-backed job queue that uses relational tables to manage and execute asynchronous tasks.
- [Polling-Based Worker Execution](https://awesome-repositories.com/f/devops-infrastructure/polling-based-worker-execution.md) — Dispatches background tasks by having workers continuously poll the database for pending work units.
- [Job Concurrency Controllers](https://awesome-repositories.com/f/devops-infrastructure/job-concurrency-controllers.md) — Restricts the number of simultaneous executions for specific task types to prevent system overload.
- [Persistent Job Queue Libraries](https://awesome-repositories.com/f/devops-infrastructure/job-queues/persistent-job-queue-libraries.md) — Implements a native backend for the framework's job interface, persisting task queues directly in the database.
- [Web Server Process Integrations](https://awesome-repositories.com/f/devops-infrastructure/web-server-process-integrations.md) — Embeds background worker processes directly within the web server environment to simplify deployment and monitoring. ([source](https://github.com/rails/solid_queue#readme))

### Software Engineering & Architecture

- [Database-Backed Persistence](https://awesome-repositories.com/f/software-engineering-architecture/job-processors/database-backed-persistence.md) — Uses relational database tables as the primary storage layer to ensure job durability and transactional integrity.
- [Recurring Task Schedulers](https://awesome-repositories.com/f/software-engineering-architecture/recurring-task-schedulers.md) — Manages recurring task definitions and execution metadata within relational database tables for consistent scheduling.

### User Interface & Experience

- [Background Task Execution](https://awesome-repositories.com/f/user-interface-experience/background-processing/background-task-execution.md) — Executes queued operations asynchronously using a relational database to ensure reliable and recoverable workloads. ([source](https://github.com/rails/solid_queue#readme))

### Web Development

- [Ruby on Rails Integrations](https://awesome-repositories.com/f/web-development/ruby-on-rails-integrations.md) — Integrates natively with the framework's job interface to simplify background processing within web applications.

### Data & Databases

- [Advisory Locking Mechanisms](https://awesome-repositories.com/f/data-databases/migration-management/advisory-locking-mechanisms.md) — Coordinates distributed worker job claims using database-level advisory locks to prevent race conditions.
