Cookie

This site uses tracking cookies used for marketing and statistics. Privacy Policy

Contact

Laravel Horizon Explained: Queue Monitoring and Scaling for Production Apps

Laravel Horizon is a first-party dashboard and configuration system for Laravel queues that run on Redis. It lets you define worker pools in code, scale workers automatically with queue load, and monitor throughput, wait times, failed jobs, and metrics in real time. Horizon requires Redis as the queue driver.

Kalpesh Rajora

Kalpesh Rajora

Publish Date: November 30, 2026

Summarize with AI:

  • ChatGPT
  • Google AI
  • Perplexity
  • Grok
  • Claude

Walk into a busy bank branch on a Monday morning. You take a token from the machine, glance at the display board, and sit down. Behind the counter, a branch manager watches the same board. When the numbers start piling up for cash deposits, she opens another counter. When the loans desk goes quiet, she moves that clerk to deposits. 

Nobody shouts, nobody leaves, and the line keeps moving. That branch manager is exactly what Laravel Horizon does for your background jobs, and it is one of the first things our Laravel enterprise development team sets up on any application that handles real traffic.

So what is Laravel Horizon used for? Horizon is Laravel's official tool for running and watching Redis-powered queues. It gives you a dashboard showing how many jobs are waiting, how fast they are processed, and which ones failed, and it lets you define your queue workers in a single configuration file. With auto-balancing, Horizon moves workers to the queues that need them most, within limits you set, so a sudden spike in emails or reports does not freeze everything else.

This Page Is For You If.

  • Your Laravel app sends emails, generates reports, or calls APIs in the background.
  • You want to know whether you need Horizon, and whether it requires Redis.
  • You are unsure how many queue workers to run, or how to scale them.
  • Jobs fail or pile up in production, and you need visibility.


As a project manager, I see queues from a slightly different angle than developers do. When a queue backs up, nobody in the business says "the queue is backed up". They say "invoices are late", "password reset emails are not arriving", or "the report has been loading for ten minutes". Horizon is how we see those problems before customers do, and fix them before they become support tickets.

This guide explains what Horizon does, why queues matter, whether you need Redis, how to set up and configure Horizon, how to work out how many workers you need, how Horizon differs from Supervisor, and how to run it safely in production.

EXPERT INSIGHT

"The most important number in Horizon is not throughput. It is wait time. Customers never feel how many jobs you processed; they feel how long theirs waited. Set a wait-time alert on every queue that a person is waiting on."

Kalpesh Rajora, Project Manager, Acquaint Softtech

Jobs piling up in production right now?

Tell us what is slowing down: emails, reports, imports or API syncs. A senior Laravel engineer will review your queue setup and tell you what to fix first.

What a Busy Bank Branch Teaches About Laravel Queues

The token machine and the counters

In a bank branch, the token machine separates arriving from being served. You do not stand at the counter waiting; you take a number, and the branch serves you when a clerk is free. Queues do the same for your application. When a user signs up, the web request finishes in milliseconds, and the welcome email, the CRM update, and the analytics event are handed to a queue as jobs. Queue workers, the clerks behind the counters, pick them up and process them in the background.

Different counters for different services

A branch does not run one long line for everything. Deposits, loans, and enquiries have separate counters, and some customers are served first. In Laravel, you do the same with named queues, such as high, default, and low, and with supervisors that assign workers to them. A password reset should never wait behind a nightly export.

The manager who watches the board

Without a manager watching the board, a branch can have three idle clerks on loans while twenty people wait for deposits. Horizon's auto-balancing plays that manager. It watches how long each queue would take to clear, or how many jobs are waiting, and shifts workers towards the busiest queues, gradually and within the minimum and maximum you allow.

The alarm when people wait too long

Good branches have a rule: if anyone waits more than a set time, a supervisor is called. Horizon has the same idea. You set a wait-time threshold for each queue, and Horizon raises a notification when jobs wait longer than that, so your team hears about the problem before your customers complain.

What Is Laravel Horizon Used For?

Laravel Horizon is used to run, configure, scale, and monitor Laravel queue workers that process jobs from Redis. It combines three things in one package.

Capability

What it gives you

Code-driven configuration

Worker pools, queues, retries, and timeouts defined in config/horizon.php

Auto-balancing

Workers shifted between queues based on load, within limits you set

Real-time dashboard

Pending, completed and failed jobs, throughput and runtime per queue

Metrics

Historical job and queue metrics through regular snapshots

Tags and search

Jobs tagged automatically, for example by the Eloquent model they relate to

Notifications

Alerts when queues wait longer than the thresholds you set

Failed job tools

Inspect exceptions and retry failed jobs from the dashboard

What Horizon does not do

Horizon does not replace Laravel's queue system; it runs on top of it. Your jobs, dispatching code, and retry logic stay the same. Horizon also does not keep itself running after a server restart. For that, you still need a process manager such as Supervisor, which I explain below.

Why Queues Matter in Production Laravel Apps

Any work that does not need to finish before the user sees a response should be queued. That keeps pages fast, protects you from slow third-party services, and lets you retry work that fails.

Typical jobs that belong on a queue

  • Sending emails, SMS and push notifications.

  • Generating PDFs, invoices and reports.

  • Processing uploaded images, videos and documents.

  • Syncing data with CRMs, ERPs, payment providers and other APIs.

  • Running AI tasks, such as summaries, embeddings and agent workflows.

  • Webhooks, imports, exports and scheduled batch work.

What happens when queues are not managed

Unmanaged queues fail quietly. A worker crashes, and nobody notices for hours. A burst of export jobs blocks password reset emails. A slow API call ties up every worker. Each of these looks like a different bug to users, but they share a cause: nobody could see the queue. Visibility is the first reason teams adopt Horizon; automatic scaling is the second.

Queues are one part of a wider performance strategy. For the full picture, read our guide to Laravel performance optimization for real business traffic.

Does Horizon Require Redis?

Yes. Horizon requires Redis as your queue connection. It does not work with the database queue driver or managed cloud queue services. Your application needs a Redis server, the phpredis extension or the predis package, and QUEUE_CONNECTION set to redis. Horizon also relies on the pcntl and posix PHP extensions, which are standard on Linux servers.

Queue driver

Works with Horizon

Typical use

Redis

Yes

Production apps that need speed and visibility

Database

No

Small apps and low job volumes

Managed cloud queues

No

Serverless or cloud-native setups

If you cannot use Redis

You can still run reliable queues with the database or cloud queue drivers using queue:work under Supervisor. You lose Horizon's dashboard, auto-balancing, and metrics, so plan other monitoring, such as logs, alerting on failed jobs, and an application monitoring tool.

Size and protect your Redis

Because Horizon stores recent jobs, failed jobs, and metrics in Redis, give it enough memory and set sensible retention through the trim settings. In production, Redis should be private to your servers, password-protected, and monitored like any other critical service.

How to Set Up Laravel Horizon

Setting up Horizon on an existing Laravel application usually takes less than an hour. Getting the configuration right for production takes longer, and the rest of this guide covers that.

  • Install the package: run composer require laravel/horizon.

  • Publish the assets: run php artisan horizon:install to create config/horizon.php and the Horizon service provider.

  • Use Redis for queues: set QUEUE_CONNECTION=redis and check the Redis connection.

  • Configure environments: define supervisors and queues for local and production in config/horizon.php.

  • Protect the dashboard: define the viewHorizon gate so only authorised users can open /horizon outside local.

  • Start Horizon: run php artisan horizon locally, and under Supervisor in production.

  • Schedule metrics: schedule horizon:snapshot every five minutes so the metrics charts fill in.

Lock down the dashboard

By default, the Horizon dashboard is only open in the local environment. In other environments, access is controlled by the viewHorizon gate in the Horizon service provider. Restrict it to specific admin users. The dashboard shows job data, which can include customer details, so treat it like any other admin screen.

Configuring Supervisors, Queues and Balancing

The heart of Horizon is config/horizon.php. Each environment has one or more supervisors, and each supervisor manages a pool of workers for a set of queues.

A simplified production example

'environments' => [

    'production' => [

        'supervisor-critical' => [

            'connection' => 'redis',

            'queue' => ['high', 'default'],

            'balance' => 'auto',

            'autoScalingStrategy' => 'time',

            'minProcesses' => 2,

            'maxProcesses' => 12,

            'balanceMaxShift' => 1,

            'balanceCooldown' => 3,

            'tries' => 3,

            'timeout' => 60,

        ],

        'supervisor-heavy' => [

            'connection' => 'redis',

            'queue' => ['reports', 'imports'],

            'balance' => 'simple',

            'processes' => 3,

            'tries' => 1,

            'timeout' => 900,

        ],

    ],

],

This is a simplified example to show the shape of the configuration, so check the official documentation for every option. It separates fast, user-facing jobs from slow, heavy ones, so a large import can never block a password reset.

Balancing strategies

balance setting

How workers are assigned

Best for

auto

Shifted between queues based on load

Most production queues

simple

Split evenly across the listed queues

Steady, predictable work

false

Queues processed in the order listed

Strict priority

The auto-scaling settings that matter

  • autoScalingStrategy: time balances by how long each queue would take to clear; size balances by how many jobs are waiting.

  • minProcesses and maxProcesses: the floor and ceiling for workers in the pool.

  • balanceMaxShift: how many workers can be added or removed in one step.

  • balanceCooldown: how many seconds Horizon waits between adjustments.

Timeouts and retries

Set timeout to the longest a job in that pool should ever run, and tries to how many attempts make sense. Make sure the retry_after value on your Redis queue connection is longer than your longest job timeout; otherwise a slow job can be picked up again while it is still running, and you may process the same work twice.

How Many Queue Workers Do I Need?

How many queue workers do I need? A practical starting point is: workers needed equals jobs per second multiplied by the average job duration in seconds, plus headroom for spikes. Then let Horizon's auto-balancing adjust within a minimum and maximum you set.

Example workload

Calculation

Starting workers

20 emails/sec at 0.5 seconds each

20 x 0.5 = 10

10 to 15

2 reports/min at 60 seconds each

0.03 x 60 = 2

2 to 3

50 webhooks/sec at 0.2 seconds each

50 x 0.2 = 10

10 to 15

These are illustrative calculations. Real numbers come from your own metrics: Horizon's dashboard shows throughput and average runtime per queue, which are exactly the two inputs you need.

Check memory and CPU before raising the maximum

Every worker is a separate PHP process using memory. Multiply the memory each worker uses by your maxProcesses across all supervisors, and make sure it fits comfortably within your server's RAM alongside the web server and Redis. CPU-heavy jobs, such as image processing, need fewer workers per core; jobs that mostly wait on APIs can run more.

Signs you need more workers, or a different design

  • Wait times rise steadily during normal traffic, not just spikes.

  • Auto-balancing sits at maxProcesses for long periods.

  • One slow queue keeps borrowing workers from the others.

If adding workers does not help, the problem is usually the job itself: a slow query, a large payload or an external API that needs rate limiting. Fix the job before buying a bigger server.

Want help sizing and tuning your queue workers?

Hire Laravel developers with production queue and Horizon experience, from $22 an hour or $3,200 a month, ready to start within 48 hours.

Laravel Horizon vs Supervisor: What Each One Does

Horizon and Supervisor are not alternatives. Horizon manages queue workers; Supervisor keeps the Horizon process running. In production, you normally use both.

Concern

Laravel Horizon

Supervisor

What it is

Laravel queue manager and dashboard

Linux process monitor

Manages

Queue workers and balancing

Any long-running process

Restarts after crash

Its own workers

Horizon itself

Dashboard and metrics

Yes

No

Works without Redis

No

Yes, with queue:work

A typical Supervisor program for Horizon

[program:horizon]

process_name=%(program_name)s

command=php /var/www/app/artisan horizon

autostart=true

autorestart=true

user=www-data

redirect_stderr=true

stdout_logfile=/var/www/app/storage/logs/horizon.log

stopwaitsecs=3600

 Set stopwaitsecs longer than your longest-running job, so Supervisor gives Horizon time to finish work when it stops. Managed hosting platforms for Laravel can also run Horizon for you as a background process.

When queue:work with Supervisor is enough

For a small app with one or two queues and low volume, plain queue:work processes under Supervisor are perfectly fine. Horizon becomes worth it when you have several queues, changing load, or a team that needs to see what is happening without logging into servers.

Monitoring, Alerts and Failed Jobs

What to watch on the dashboard

Metric

What it tells you

Wait time per queue

How long new jobs will wait; the number customers feel

Jobs per minute

Throughput, to compare against normal levels

Runtime per job

Slow jobs that need optimising

Failed jobs

Exceptions, payloads and the option to retry

Processes per queue

Whether auto-balancing is hitting its limits

Long-wait notifications

In config/horizon.php, the waits setting defines how many seconds a queue may wait before Horizon raises a long-wait event. Route notifications to email, team chat, or SMS from the Horizon service provider, and set tighter thresholds for user-facing queues than for background reporting.

Tags make debugging faster

Horizon automatically tags jobs with the Eloquent models they reference, and you can add your own tags. When a customer reports a problem, you can search for jobs tagged with their account and see exactly what ran, when, and with what result.

Handling failed jobs

Failed jobs show the exception and payload in the dashboard and can be retried once the cause is fixed. Combine this with error tracking, and make important jobs idempotent, so running them twice never charges a customer twice or sends a duplicate email.

Running Horizon Safely in Production

  • Restart on every deploy: run php artisan horizon:terminate so workers finish current jobs and Supervisor starts them again with the new code.

  • Pause for maintenance: use horizon:pause and horizon:continue when you need workers to stop picking up new jobs briefly.

  • Trim old data: set retention for recent, completed, and failed jobs so Redis does not grow without limit.

  • Silence noisy jobs: hide high-volume, low-value jobs from the completed list so the dashboard stays useful.

  • Separate heavy work: run long imports and reports in their own supervisor, or on their own server.

  • Check Horizon is running: horizon:status tells you whether it is active; alert if it is not.

The production checklist we use

Check

Why it matters

Dashboard protected by viewHorizon

Job data can include customer details

Supervisor with stopwaitsecs set

Horizon restarts after crashes and finishes jobs on stop

horizon:snapshot scheduled

Metrics charts stay populated

Wait thresholds and notifications

Problems surface before customers notice

retry_after longer than timeouts

No duplicate processing of slow jobs

Memory limits checked

Workers never exhaust server RAM

 If you would rather have experts watch your queues, our Laravel maintenance and support plans include performance monitoring, uptime alerts, and incident response, starting at $1,200 a month.

Background Work in Practice: A Real Estate Platform

Background processing matters most where many people depend on timely updates. An Icelandic real estate company offering transactions, valuation, brokerage, and property management ran its listings, agents, and leads on partly disconnected tools, and lead ownership was unclear as leads moved between departments. Acquaint Softtech built a custom Laravel backend over four months. Read the full real estate backend case study.

What was built

Component

What it does

Unified backend

Listings, agent activity, and lead tracking in one system

Modular services

Listings and leads can evolve independently

Role-based permissions

Agents, team leads, and administrators see the right data

Event-driven notifications

New leads, listing updates and status changes trigger alerts

CRM integration layer

Connects to existing tools without manual re-entry

Where queues fit in a platform like this

The case study describes event-driven notifications and CRM integration rather than naming a specific queue setup, so I will not claim more than it says. But this is exactly the kind of work that belongs on queues in production: notifying agents about new leads, syncing records with a CRM, and generating manager dashboards, all without slowing down the agent using the system. Managers gained real-time visibility into pipeline activity, and the client's managing director highlighted a permissions system that both agents and administrators accepted.

How Acquaint Softtech Runs Laravel Queues at Scale

At Acquaint Softtech, an Official Laravel Partner with 70+ in-house engineers, queue design is part of every production Laravel build. We separate user-facing and heavy queues, size workers from real metrics, set wait-time alerts, and include Horizon checks in every deployment.

For subscription products, queues carry billing, notifications, usage calculations, and exports for every tenant. Our Laravel SaaS development team designs those queues so one tenant's heavy job never slows down another tenant.

If you need help on your existing app, you can hire Laravel developers with production queue experience who start within 48 hours, from $22 an hour or $3,200 a month.

Are your queues ready for real traffic?

Tell us about your Laravel app, your job volumes, and where things slow down. We will review your queue setup, Horizon configuration, and worker sizing, and tell you what to fix first. Free 30-minute consultation.

Frequently Asked Questions

  • What is Laravel Horizon used for?

    Horizon is used to configure, auto-scale, and monitor Laravel queue workers that run on Redis, with a dashboard for wait times, throughput, and failed jobs.

  • Does Horizon require Redis?

    Yes. Horizon only works with Redis as the queue connection. For database or cloud queues, use queue:work with Supervisor instead.

  • How many queue workers do I need?

    Start with jobs per second multiplied by average job duration in seconds, add headroom for spikes, then let auto-balancing adjust within set limits.

  • What is the difference between Laravel Horizon and Supervisor?

    Horizon manages and monitors queue workers. Supervisor keeps the Horizon process running and restarts it after crashes. Production apps use both.

  • Is Laravel Horizon free?

    Yes. Horizon is a free, open-source, first-party Laravel package.

  • How do I restart Horizon after deploying?

    Run php artisan horizon:terminate. Workers finish current jobs and Supervisor restarts Horizon with the new code.

  • How do I secure the Horizon dashboard?

    Define the viewHorizon gate in the Horizon service provider so only authorised users can access it outside the local environment.

Kalpesh Rajora

I am Kalpesh Rajora, a Project Manager at Acquaint Softtech with 8+ years of experience leading Laravel and full-stack delivery teams. I specialise in sprint planning, client communication, and shipping complex software projects on time across distributed teams. I write about the delivery side of software: how projects are scoped, where timelines slip, and what keeps remote teams aligned.

Get Started with Acquaint Softtech

  • 13+ Years Delivering Software Excellence
  • 1300+ Projects Delivered With Precision
  • Official Laravel & Laravel News Partner
  • Official Statamic Partner

Related Blog

Laravel Performance Optimization: How to Scale a Laravel App for Real Business Traffic

Laravel performance optimization is the work of finding and removing the bottlenecks that make an app slow under traffic, then architecting it to scale. The biggest single win is almost always eliminating N+1 queries and adding indexes, which cuts response times by 80 to 95%. Measure first, fix the biggest bottleneck first, and never rewrite when a targeted fix will do.

Kalpesh Rajora

Kalpesh Rajora

July 2, 2026

Laravel Development Cost in 2027: Hourly Rates, Project Pricing and AI Feature Costs

Laravel development usually costs $8,000 to $22,000 for an MVP, $20,000 to $65,000 for a SaaS app, and $40,000 to $100,000+ for regulated platforms. Laravel developers charge about $22 to $55 an hour in India and $100 to $180 an hour in the US. Adding AI features typically adds $10,000 to $30,000.

Mukesh Ram

Mukesh Ram

January 23, 2025

India (Head Office)

203/204, Shapath-II, Near Silver Leaf Hotel, Opp. Rajpath Club, SG Highway, Ahmedabad-380054, Gujarat

USA

7838 Camino Cielo St, Highland, CA 92346

UK

The Powerhouse, 21 Woodthorpe Road, Ashford, England, TW15 2RP

New Zealand

42 Exler Place, Avondale, Auckland 0600, New Zealand

Canada

141 Skyview Bay NE , Calgary, Alberta, T3N 2K6

Subscribe to new posts