Laravel Redis: Configuration

The Redis configuration for your application is located in the config/database.php.

Configuring Clusters

Will perform client-side sharding across your nodes, allowing you to pool nodes and create a large amount of available RAM.

'redis' => [

    'client' => 'predis',

    'clusters' => [
        'default' => [
            [
                'host' => env('REDIS_HOST', 'localhost'),
                'password' => env('REDIS_PASSWORD', null),
                'port' => env('REDIS_PORT', 6379),
                'database' => 0,
            ],
        ],
    ],

],
'redis' => [

    'client' => 'predis',

    'options' => [
        'cluster' => 'redis',
    ],

    'clusters' => [
        // ...
    ],

],

Related concepts

Laravel Redis: Configuration — Structure map

Clickable & Draggable!

Laravel Redis: Configuration — Related pages: