HeadlinesBriefing favicon HeadlinesBriefing.com

Rails 8 Ditches Redis for SolidQueue

Hacker News: Front Page •
×

Rails 8 removes Redis from its default stack, replacing it with SolidQueue for job management. This new suite, including SolidCache and SolidCable, runs entirely on your existing relational database. For a decade, Redis was the go-to for queuing and caching, but this shift aims to simplify infrastructure by leveraging PostgreSQL or MySQL instead.

The move addresses Redis's hidden operational costs. Managing a separate key-value store requires ongoing maintenance, persistence strategies, and high-availability clusters. SolidQueue uses PostgreSQL's `FOR UPDATE SKIP LOCKED` command, a database optimization that prevents lock contention. This allows multiple workers to claim jobs simultaneously without blocking each other, making database-backed queues viable at scale.

Beyond job queuing, SolidQueue includes built-in recurring jobs, eliminating the need for extra libraries like sidekiq-cron. It also offers free concurrency limits, a feature typically reserved for expensive enterprise editions of competitors. By collapsing these functions into the primary database, Rails simplifies the stack, reducing complexity and allowing developers to focus on application logic rather than infrastructure management.