What is Laravel Horizon:
Laravel Horizon is a laravel tool/software to control and monitor your queues with a good dashboard and code-driven configuration. It is designed to monitor queues from a web dashboard and set notifications and alerts when things doesn’t work as expected.
What are the Key Features of Laravel Horizon:
Listed below are some of the key features of Laravel Horizon:
Horizon will be able to balance workers across different queues smartly itself. When any of the queue becomes overloaded, Horizon can smartly check if any other workers are available and assign them to queues that need help.
- Code-Driven Configuration
Laravel Horizon uses code-driven configuration, which empowers you to version control it along with your project.
- Dashboards and Metrics
With Laravel Horizon realtime dashboard you can visualize what the queues and jobs are doing. The metrics enables you to monitor closely things like performance, job status and the amount of work done (througput).
- Queue monitoring
Laravel Horizon allows you to tag your jobs and monitor them with a smart and simple dashboard. Real-time monitoring enables you to analyze the usage patterns and issues as per your needs.
- Failed Job Management
Majority of the people who have used Laravel queues have experience of SSH into a server and then manually retry failed queues and jobs. Laravel Horizon makes it easier for you to retry all the failed jobs, search jobs which are having any issue and then retry specific jobs if they have any issues. For example you can list all the failed jobs for a particular user or a user group and then retry only those jobs.
Laravel Horizon can enable you to get notified on specific queue states, for example overloading of a queue, jobs getting failed or if a queue is stuck in some particular state for a longer than expected time. You can also setup custom monitoring to generate notifications when things don’t go as expected, but with Laravel Horizon it is simpler to manage all such notifications without all the fuss of setting and validating all the custom monitoring solutions.
- Open-Source Software
In the end as we know Laravel Horizon is 100% open-source software which is the best part about it. You can also contribute to the source code and submit fixes or enhancements if you think it is worth.
How to Use:
Laravel Horizon requires Laravel 5.5, which is currently in beta, and PHP 7.1+. You can use Composer to install Horizon into your Laravel project:
composer require laravel/horizon
After installing Horizon, publish its assets using the
vendor:publish Artisan command:
php artisan vendor:publish