Submitting the form below will ensure a prompt response from us.
Modern applications rely heavily on background jobs to handle tasks such as email, notifications, file processing, and intensive computations. If you’re using Laravel queues, then Laravel Horizon is one of the most powerful tools available to monitor, manage, and optimize them. Built by the Laravel team, Horizon provides a beautiful dashboard, real-time insights, job metrics, and advanced configuration options — all backed by Redis.
This guide explains what Laravel Horizon is, how it works, how to install it, best practices, common troubleshooting tips, and essential code examples to get you started.
Laravel Horizon is an official Laravel package that provides:
It’s designed especially for teams that need deep visibility into background job processing.
Horizon gives a visual dashboard to track:
Horizon manages Laravel queue workers automatically, so you don’t need to run php artisan queue: work manually.
All metrics, such as job runtime, number of processed jobs, or failed jobs, are stored in Redis and displayed visually.
Horizon intelligently distributes jobs across workers using:
You can enable alerts when:
The intuitive UI shows everything at a glance.
Horizon requires Laravel and Redis.
composer require laravel/horizon
php artisan horizon: install
This creates:
config/horizon.php
php artisan horizon
Horizon will now manage all queue workers.
Visit:
https://yourapp.com/horizon
You define workers inside config/horizon.php.
Example:
‘production’ => [
‘supervisor-1’ => [
‘connection’ => ‘redis’,
‘queue’ => [‘default’, ’emails’],
‘balance’ => ‘auto’,
‘processes’ => 10,
‘tries’ => 3,
],
],
Enable the failed jobs table:
php artisan queue:failed-table
php artisan migrate
View failed jobs in Horizon UI or via CLI:
php artisan queue:failed
Retry them:
php artisan queue:retry all
Clear failed jobs:
php artisan queue:flush
If you update your code after deployment, restart Horizon:
php artisan horizon:terminate
This ensures Horizon reloads new code.
Never expose Horizon publicly without protection.
Horizon::auth(function ($request) {
return auth()->check() && auth()->user()->is_admin;
});
Horizon works only with Redis, not database queues.
Use –memory flag in queue worker config to prevent leaks.
Let Horizon intelligently manage job load.
Multiple supervisors help isolate:
Set threshold notifications in production.
Restart workers:
php artisan horizon:terminate
Check .env:
QUEUE_CONNECTION=redis
REDIS_CLIENT=phpredis
Clear cached routes:
php artisan route:clear
php artisan config:clear
Ensure supervisor processes > 1 in production.
Use Horizon if you need:
Horizon is ideal for SaaS apps, eCommerce systems, reporting engines, and notification-heavy platforms.
Need help setting up, scaling, or securing Laravel Horizon? Our Laravel experts build high-performance queue systems tailored to your business needs.
Laravel Horizon gives developers complete visibility and control over background job processing. Its real-time dashboard, job analytics, balancing system, and powerful supervisor configurations make Laravel queues production-ready and scalable. Whether you’re running a small application or a high-traffic enterprise system, Horizon simplifies monitoring, debugging, and scaling queue workers.
For more on Laravel development services, you can explore our Laravel Development Services.
Submitting the form below will ensure a prompt response from us.