Solid Queue 1.6.0 now supports fiber workers
Solid Queue v1.6.0: Now Supporting Fiber Workers
Released on July 31 by rosa, the latest update to solid_queue (v1.6.0) introduces a highly anticipated shift in how jobs can be executed.
🚀 The Headline Feature: Fiber Execution Mode
Thanks to the contributions of @crmne, users are no longer limited to using a standard thread pool to handle multiple jobs per worker. Instead, you can now leverage fibers running on a single fiber reactor thread.
Why use Fibers?
This mode is specifically designed to optimize CPU-heavy I/O-bound workloads. A prime example would be applications making frequent calls to Large Language Models (LLMs), where the system spends most of its time waiting for a network response.
Mathematically, the efficiency gain in I/O-bound scenarios can be thought of as reducing the overhead of context switching:
🛠️ Implementation Guide
To transition from threads to fibers, you must update your worker configuration.
Configuration Change:
threads: 5fibers: 100
workers:
- queues: " api* "
fibers: 100
polling_interval: 0.05
Prerequisites Checklist
Before this will function, ensure the following are completed:
- Add the
Asyncgem to your project dependencies (as it powers the reactor under the hood). - Enable fiber isolation within your Rails configuration:
config.active_support.isolation_level = :fiber
🔄 Architectural Shift
The following diagram illustrates the transition from the traditional multi-threaded approach to the new fiber-based reactor model:
📝 Other Notable Changes
Beyond the fiber implementation, v1.6.0 includes several refinements:
| Change | Contributor | Description |
|---|---|---|
| Transaction Fix | @rosa | Resolved an issue where killed job threads in tests leaked transactions. |
| Documentation | @wintan1418 | Added guidance on how to handle updates for dynamic recurring tasks. |
Note: This release marks the first contributions from both
@crmneand@wintan1418to the project.
👥 Contributors & Community
The community response has been overwhelmingly positive, with dozens of reactions including ❤️, 👍, and 🚀.
Key Contributors to this Release:
- rosa
- crmne
- wintan1418
For a complete list of modifications, you can view the Full Changelog: v1.5.1...v1.6.0.