laravel Redis sentinel config

'default' => [
            'tcp://11.11.11.11:26379',
            'tcp://11.11.11.11:26381',
            'tcp://11.11.11.11:26382',    //这3个都是sentinel节点的地址
            'options' => [
                'replication' => 'sentinel',
                'service'     => env('REDIS_SENTINEL_SERVICE', 'mymaster'),    //sentinel
                'parameters'  => [
                    'password' => env('REDIS_PASSWORD', null),    //redis的密码,没有时写null
                    'database' => 0,
                ],
            ],
        ]

  

 
posted @ 2023-01-09 17:00  花泪哲  阅读(32)  评论(0编辑  收藏  举报