laravel/horizon
Laravel Horizon adds a polished dashboard and code-driven configuration for Laravel Redis queues. Monitor throughput, runtimes, and failed jobs, and manage all worker and supervisor settings from a single config file kept in source control.
Laravel Horizon (v5.47.0) remains a first-class solution for Redis-based queue management in Laravel, with no architectural changes in this release. Key strengths persist:
horizon.php for team collaboration (unchanged).Key Fit Criteria (Unchanged):
✅ Redis Dependency: Optimized for Redis (no support for database/beanstalkd queues).
✅ Laravel Ecosystem: Native integration with Laravel jobs/middleware.
✅ Monitoring Needs: Ideal for high-visibility async workflows (e.g., order processing).
postcss, axios) are non-critical (frontend assets only).queue:work with horizon:work (no changes to workflow).Compatibility Notes (Unchanged):
| Risk Area | Assessment | Mitigation Strategy |
|---|---|---|
| Redis Dependency | Hard dependency on Redis (unchanged). | Audit queue usage; test Redis performance under load. |
| Worker Process Model | Horizon replaces queue:work (unchanged). |
Pilot in staging; monitor job throughput. |
| Dashboard Overhead | Web UI assets updated via Dependabot (v5.47.0); negligible impact. | Pre-warm Horizon cache; use CDN for production. |
| Configuration Drift | Centralized horizon.php (unchanged). |
Enforce CI checks for config validation. |
| Legacy Jobs | No changes to job handling (unchanged). | Test with critical jobs pre-migration. |
New Risks (v5.47.0):
postcss/axios bumps may require Vite rebuilds if customizing dashboard.
Mitigation: Test dashboard UI post-update in staging.resources/js/horizon)? If yes, test Vite rebuilds post-update." (New)Horizon (v5.47.0) remains optimized for:
Anti-Patterns (Unchanged):
❌ Non-Redis Queues: Still incompatible with database/beanstalkd.
❌ Headless Workers: Dashboard may feel redundant if relying solely on CLI.
| Phase | Action Items | Tools/Commands |
|---|---|---|
| Prep | Audit queues; benchmark Redis. | php artisan queue:failed-table. |
| Install | composer require laravel/horizon, php artisan horizon:install. |
|
| Configure | Define supervisors in horizon.php. |
Template. |
| Test | Validate jobs route through Horizon; monitor dashboard. | php artisan horizon:terminate, php artisan horizon:flush. |
| Deploy | Replace queue:work with horizon:work. |
Supervisor: horizon:work --daemon. |
| Optimize | Tune supervisors; set up alerts. | php artisan horizon:monitor. |
Critical Path (Unchanged):
New Consideration (v5.47.0):
npm run dev # or `npm run build` for production
| Component | Compatibility Notes |
|---|---|
| Laravel Jobs | Zero changes needed. |
| Middleware | Works as-is. |
| Delayed Jobs | Fixed in v5.45.5 ($later support). |
| Supervisor | Horizon replaces Supervisor. |
| Redis | Supports Redis Cluster (v5.46.0+). |
queue:work for non-critical queues.horizon:failed.Rollback (Unchanged):
php artisan queue:work (loses dashboard features).| Task | Horizon Impact | Frequency |
|---|---|---|
| Configuration | Centralized in horizon.php (version-controlled). |
Per release cycle. |
| Updates | Minor updates via composer update; test Vite assets if customizing dashboard. |
Quarterly. |
| Dashboard | Custom views in resources/views/vendor/horizon (unchanged). |
As needed. |
| Redis | ~10–20% Redis memory usage for job metadata (unchanged). | Monitor regularly. |
Proactive Maintenance (Updated):
php artisan horizon:flush post-deploy.horizon.php.composer update, rebuild Vite if customizing:
npm install && npm run dev
horizon:retry, horizon:monitor.horizon:failed.horizon:reload (v5.40.2+).monitoring_interval.Support Matrix (Unchanged):
| Issue Type | Horizon Tooling | Workaround |
|---|---|---|
| Job Failures | Dashboard filters, horizon:retry. |
Manual retry via CLI. |
| High Memory Usage | horizon:flush to clear old jobs. |
Tune max_jobs in supervisors. |
| Dashboard Slowdown | Increase monitoring_interval or optimize Redis. |
Use horizon:listen --min-processes=1. |
supervisor:count in horizon.php.redis-cli --cluster.No Changes in v5.47.0: Dependabot updates are frontend-only and do not affect scaling.
How can I help you explore Laravel packages today?