The services
Horizon
Every inbound message, every outbound send and every flow execution runs in a queued job. Horizon supervises the workers that consume them. The queues are separated by purpose, andconfig/horizon.php groups them into
supervisors by priority:
A supervisor of its own,
solution-jobs, serves the solution-jobs.<id> queues of installed
Solutions on redis-long. It exists only while at
least one Solution is installed, with one worker per Solution and one more for the busiest. A Solution installed later has its queue served after
php artisan horizon:terminate, which every upgrade runs.
Two things about this matter operationally:
Do not consolidate the queues into one worker pool. A broadcast to fifty
thousand contacts would then sit in front of a live conversation, and the person
waiting for an answer would get one when the broadcast finishes.
Horizon needs pcntl and posix. Without them it fails to start, and
because the web tier is unaffected the installation looks healthy.
Restart Horizon on every deploy. Workers are long-lived PHP processes holding the
previous release in memory:
Scheduler
Laravel’s scheduler must be invoked once a minute. It drives scheduled triggers, flow log partition creation and cleanup tasks. Traditional cron:Horizon under systemd
Restart=always matters more than usual: Horizon terminates itself when a worker
exceeds its memory limit, and expects a supervisor to bring it back.
Verifying
Related
- Deployment overview
- Docker Compose — where these services are containers
- Bare metal
- Webhook gateway — the optional third service