QA
Intermediate LevelLaravel

What is Laravel Horizon and how does it monitor Redis queues?

❓ Interview Prompt: Explain Laravel Horizon, config/horizon.php, real-time dashboard UI, auto-scaling worker strategies, and failed job metrics.

Laravel Horizon provides a beautiful real-time dashboard and configuration system for Laravel Redis queues.

Key Features:

•
Auto-scaling Workers: Spawns worker processes dynamically based on queue workload spikes.
•
Metrics: Monitors job throughput, runtime averages, queue wait times, and failure rates.
•
Failed Job Management: Retries or discards failed queued jobs directly from the web dashboard.

Code Implementation Example

php
<?php
// In config/horizon.php
'environments' => [
    'production' => [
        'supervisor-1' => [
            'connection' => 'redis',
            'queue' => ['default', 'high'],
            'balance' => 'auto',
            'minProcesses' => 1,
            'maxProcesses' => 10,
        ],
    ],
];
💡Configuring Horizon auto-scaling queue supervisor processes.
🎯 Interview Key Takeaway

Use Laravel Horizon to monitor Redis queues, auto-scale worker processes, and manage failed jobs via a web dashboard.

#Horizon#Redis Queue#Monitoring#Intermediate
Back to all Laravel Questions→

More Laravel Interview Questions

Beginner LevelLaravel

How does the Laravel Service Container manage Dependency Injection and Bindings?

Beginner LevelLaravel

How does Routing work in Laravel including Named Routes and Route Parameters?

Beginner LevelLaravel

What is Blade Templating and how do custom directives work?