← Back to Course

Using Redis for Queue Management

Redis is an in-memory data store that Laravel supports as a first-class queue driver. It's fast, handles high job throughput well, and pairs naturally with Laravel Horizon for monitoring.

Configuring Redis as the Queue Driver

In the .env file:

QUEUE_CONNECTION=redis

The corresponding connection details live in config/queue.php under the redis key, pointing at the Redis connection defined in config/database.php.

Why Redis Over the Database Driver

AspectDatabase DriverRedis Driver
SpeedSlower (disk-based)Much faster (in-memory)
ConcurrencyCan suffer table locks under loadHandles high concurrency well
Extra toolingLimitedWorks with Horizon for dashboards

Monitoring With Horizon

composer require laravel/horizon
php artisan horizon

Horizon gives a dashboard for queue throughput, failed jobs, and worker status, which becomes especially useful once queues are running many different job types.

Queues handle work triggered by user actions. The next few topics look at work that needs to run automatically, on a schedule, without anyone triggering it at all.

Ready to master Laravel Training Course?

Join Uncodemy's hands-on Laravel program and build real, production-ready applications.

Explore Course