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:
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