- Resources & Library
- For Developers & Technical Teams
- Backend & Databases
Organize Laravel Horizon Configuration Across Environments
Dozens of queues should not produce three drifting configuration copies; build a shared baseline and make each environment's differences explicit.
Omar Alalwi Article
When a system has dozens of queues, repeating their complete configuration for local, staging, and production causes values to drift and mistakes to remain hidden. Most settings are shared, while only worker counts, balancing, or attempts may differ.
Define a common baseline for each worker group, then apply small and explicit overrides per environment. Enums or configuration objects can standardize queue names, balancing strategies, and retry values, preventing typing errors and improving completion and static checks.
Remember that configuration files load early and may be cached, so their construction should be deterministic and must not depend on services that are not yet bootstrapped. Test the final configuration shape in every environment and verify that every queue has an appropriate worker. The aim is less duplication while operational differences remain visible.
Share your perspective
I’d be glad to hear your perspective. Leave a comment on the original article on social media.