When working with Laravel Horizon, itโs easy to get started, run php artisan horizon, dispatch some jobs, monitor them in the dashboard, and youโre good to go. But as your application scales and the amount of jobs grow more complex, subtle issues begin to surface. The design of your jobs and configuration of Horizon and Redis must be correct in order to run Horizon without issues.
I've been working with Laravel Horizon for the past five years on Laravel applications that do 1M+ jobs per day. In this article, Iโll share what Iโve learned from working with Laravel Horizon for five years. Including how I prefer to design jobs; how I isolate queues to prevent bottlenecks; and most importantly, the hidden pitfalls of Horizon's configuration and how to avoid them. If youโve ever had a job mysteriously fail to dispatch or vanish without explanation, read this article.
I've added a few code examples from my open source project, Vigilant. An all-in-one website monitoring application.
continue reading on govigilant.io
โ ๏ธ This post links to an external website. โ ๏ธ
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.