Skip to main content
Lead Generation Websites, Google Maps Ranking, WhatsApp Funnels, Ecommerce, SEO, Web DesignSpeed Optimization · Conversion Optimization · Monthly Lead Systems · AI AutomationLead Generation Websites, Google Maps Ranking, WhatsApp Funnels, Ecommerce, SEO, Web Design

Laravel Horizon Setup Guide: Monitor Redis Queues Like a Pro

Published: January 15, 2026
Written by Sumeet Shroff
Laravel Horizon Setup Guide: Monitor Redis Queues Like a Pro
Table of Contents
  1. Why Horizon and Redis
  2. Installation and basic configuration
  3. Supervisors, balancing and worker sizing
  4. Comparison: balancing strategies at a glance
  5. Alerts and monitoring
  6. Dashboards and observability
  7. Deployment and process management
  8. Security and Redis hardening
  9. Real-World Scenarios
  10. Real-World Scenarios
  11. Scenario 1: Sudden spike in email jobs
  12. Scenario 2: Memory leak in image processing worker
  13. Scenario 3: Redis latency during backups
  14. Checklist
  15. Checklist
  16. Latest News & Trends
  17. Operational runbook highlights
  18. FAQ
  19. Key considerations for scaling
  20. How Prateeksha Web Design runs Horizon in production
  21. About Prateeksha Web Design
In this guide you’ll learn
  • How to install and configure Laravel Horizon and Redis for production
  • How to design supervisors, balancing and alerts to avoid queue backlogs
  • How to set up dashboards and operational practices for reliable background jobs

Laravel Horizon Setup Guide: Monitor Redis Queues Like a Pro

This practical guide walks through a production-grade Laravel Horizon setup and operations plan. We'll cover installation, configuration, supervisors, queue balancing, alerting, observability and runbook ideas so teams can manage Redis-backed jobs with confidence.

Note: examples assume Redis as the queue driver and a modern Laravel release.

Why Horizon and Redis

Laravel Horizon is the officially supported dashboard and process manager to monitor Redis queues. It makes it easy to visualize queue throughput, failed jobs, and supervisors, but running Horizon reliably in production requires decisions: how many supervisors, how to distribute workers across queues, how to alert on failures, and how to tune Redis.

This guide repeatedly references practical patterns for laravel horizon setup redis queues to help you move from PoC to production.

Tip Use separate Redis instances or logical databases for caching vs queues in high-throughput systems to avoid contention.

Installation and basic configuration

  1. Require Horizon and configure queue driver
  • composer require laravel/horizon
  • Set QUEUE_CONNECTION=redis in .env
  • Publish Horizon config: php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
  1. Configure config/horizon.php
  • Define environments, supervisors, and queue mapping.
  • Example supervisor block (simplified):
'supervisors' => [
  'critical' => [
    'connection' => 'redis',
    'queue' => ['high', 'default'],
    'balance' => 'simple',
    'processes' => 10,
    'tries' => 3,
  ],
],
  1. Redis tuning basics
  • Use persistence settings that suit your SLA (AOF vs RDB). For queues, AOF may add durability at the cost of latency.
  • Make worker scripts idempotent and short-running where possible.
Fact Horizon monitors Redis queues and exposes metrics like runtime, throughput, and failed job counts that are crucial for SLOs.

Supervisors, balancing and worker sizing

Supervisor design is the most important operational decision.

  • One supervisor per job-type or queue group keeps isolation (e.g., image-processing, email, notifications).
  • Use process isolation when jobs are memory-heavy.
  • Choose a balance strategy:
    • simple: equal distribution of processes among queues
    • auto: Horizon shifts workers to busy queues
    • false: no balancing

Sizing rules-of-thumb:

  • CPU-bound: fewer processes, larger instance CPU
  • I/O-bound: more processes per CPU
  • Memory-bound: cap processes to avoid swapping

Comparison: balancing strategies at a glance

Below is a short comparison to help pick the right strategy.

StrategyBest forUpsidesDownsides
simplePredictable workloadsDeterministic distributionMay underutilize workers
autoVariable job rateMoves workers to busy queuesSlight orchestration overhead
falseStrict segregationFull queue isolationRequires manual tuning

Alerts and monitoring

Good monitoring uses both Horizon metrics and external alerting.

  • Monitor failed_jobs table and Horizon failed job metrics

  • Alert on:

    • Queue backlog over threshold (jobs/minute)
    • Repeated job failure spikes
    • Horizon process down
    • Redis latency or slow commands
  • Integrate with PagerDuty, Opsgenie, or Slack for notifications.

Example alert rules:

  • If a queue has > 500 waiting jobs for 5 minutes, page an engineer.
  • If job failure rate increases by 3x over baseline for 10 minutes, trigger a high-priority incident.

Use Horizon's metrics (Prometheus exporters) or push Horizon telemetry into your APM.

Warning Avoid only relying on Horizon's UI. If Horizon process or the server dies, you lose the dashboard; external metrics are essential.

Dashboards and observability

Build dashboards that show:

  • Jobs processed per minute per queue
  • Average job runtime and P95/P99
  • Current queue length (pending jobs)
  • Number of active workers per supervisor
  • Failed jobs and retry rates

Use Grafana + Prometheus or your APM. Use Horizon's published metrics endpoint or integrate with Laravel Telescope for local debugging.

External references for observability and web performance:

Deployment and process management

  • Run Horizon as a supervised system process (systemd, supervisord, or a process manager from your PaaS).
  • Use process managers to ensure Horizon automatically restarts.
  • Scale horizontally: run Horizon on multiple hosts and tag supervisors with identifying names so you can control restarts during deploys.

Recommended systemd unit (conceptual):

[Unit]
Description=Laravel Horizon
After=network.target

[Service] User=www-data Restart=always ExecStart=/usr/bin/php /var/www/current/artisan horizon

[Install] WantedBy=multi-user.target

Ensure graceful restarts with php artisan horizon:terminate during deployments so workers finish current jobs.

Security and Redis hardening

  • Use strong authentication for Redis and network-level controls (VPCs, firewall rules).
  • Limit access to Redis to only app servers and monitoring tools.
  • Monitor Redis command latencies and slowlog.

Refer to NIST and OWASP guidance for secure operations and threat modeling: NIST Cybersecurity Framework, OWASP.

Real-World Scenarios

Real-World Scenarios

Scenario 1: Sudden spike in email jobs

A marketing campaign triggers a 10x increase in email jobs. The team used an auto-balanced supervisor for mail and an isolated supervisor for transactional emails. Auto balance shifted workers toward the mail queue, but monitoring alerted on retries and SMTP rate limits, prompting throttling and staged dispatch.

Scenario 2: Memory leak in image processing worker

An image-processing job introduced a leak and crashed workers after a few hours. Multiple small instances with capped processes limited blast radius; alerting on OOM kills and rising restart counts led to a quick rollback and patch.

Scenario 3: Redis latency during backups

A scheduled Redis RDB snapshot caused GC-like latency, increasing job runtimes and causing timeouts. The ops team moved queue traffic to a read-replica and adjusted snapshot schedule to off-peak times while tuning persistence settings.

Checklist

Checklist

  • Set QUEUE_CONNECTION=redis in .env and install Horizon
  • Publish and review config/horizon.php supervisor settings
  • Define supervisors per job-type with appropriate process counts
  • Configure balance strategy (simple/auto/false) for each supervisor
  • Set up external monitoring (Prometheus/Grafana or APM) for queue length and failure rate
  • Configure alerting for backlog, failure spikes, and Horizon process health
  • Harden Redis network access and authentication
  • Use systemd or process manager to run Horizon with auto-restart and graceful terminations
  • Add runbooks: what to do when backlog > threshold, or failure rate spikes

Latest News & Trends

  • Growing interest in observability for background processing: more teams instrument P95/P99 runtimes for jobs.
  • Serverless queue patterns are increasingly used, but dedicated Horizon+Redis setups remain common for predictable latency and control.
  • Integrations between Horizon metrics and APMs (Datadog, New Relic) are improving to give end-to-end traces for background jobs.

Operational runbook highlights

  • On alert (queue backlog): check Horizon dashboard, Redis INFO, and recent deploys. If backlog persists, scale up supervisor processes or add instances.
  • On high failure rate: inspect failed job payloads, recent code changes, and external dependencies (APIs, storage). Roll back if necessary.

FAQ

(See the FAQ section below for quick answers to common operational questions.)

Key considerations for scaling

  • Horizontal scaling: add hosts running Horizon supervisors tagged for different roles.
  • Vertical scaling: increase instance CPU/memory and adjust processes count.
  • Partition queues by priority and SLA to avoid high-priority job starvation.
Key takeaways
  • Design supervisors per job-type and tune process counts to workload characteristics
  • Use a mix of Horizon metrics and external monitoring for reliable alerting
  • Choose an appropriate balance strategy (simple/auto/false) based on queue patterns
  • Harden Redis access and monitor latency; avoid single points of failure
  • Document runbooks and automate graceful restarts during deploys

How Prateeksha Web Design runs Horizon in production

Prateeksha Web Design runs laravel horizon setup redis queues across dedicated instances, with isolated supervisors per job class, Prometheus telemetry, and automated alerts. They prefer conservative auto-balancing for variable workloads, systemd-managed Horizon processes, and Redis instances on private networks with monitoring and backup policies.

About Prateeksha Web Design

Prateeksha Web Design builds scalable Laravel applications, configuring and operating Horizon for production. We provide queue architecture, Redis tuning, monitoring dashboards, alerting, and ongoing support to keep background processing reliable and performant for growth-focused businesses using SRE practices and observability.

Chat with us now Contact us today.

Sumeet Shroff
Sumeet Shroff
Sumeet Shroff is a renowned expert in web design and development, sharing insights on modern web technologies, design trends, and digital marketing.

Comments

Leave a Comment

Loading comments...