zoukankan      html  css  js  c++  java
  • laravel redis sentinel 和 redis cluster 配置

    laravel redis sentinel配置:

    'redis' => [
        'cluster' => false,
    
        'options' => [
            'replication' => 'sentinel',
            'service' => 'redis-master',
            'parameters' => [
                'password' => 'xxxxxxx',
                'database' => 0,
            ],
        ],
    
        'default' => [
            'tcp://192.168.0.11:27000', 'tcp://192.168.0.23:27002', 'tcp://192.168.0.24:27001',
        ],
    ],

    laravel redis cluster配置:

        'redis' => [
    
            'cluster' => true,
    
            'options' => ['cluster' => 'redis'],
    
            'default' => [
                [
                    'host'     => '192.168.0.11',
                    'port'     => 6381,
                    'database' => 0,
                    'timeout'  => 15,
                    'read_write_timeout' => 1800, //redis客户端连接以后的读写超时时间(默认是60s)
                    'password' => null,
                ],
                [
                    'host'     => '192.168.0.11',
                    'port'     => 6382,
                    'database' => 0,
                    'timeout'  => 15,
                    'read_write_timeout' => 1800,
                    'password' => null,
                ],
                [
                    'host'     => '192.168.0.11',
                    'port'     => 6383,
                    'database' => 0,
                    'timeout'  => 15,
                    'read_write_timeout' => 1800,
                    'password' => null,
                ],
                [
                    'host'     => '192.168.0.11',
                    'port'     => 6384,
                    'database' => 0,
                    'timeout'  => 15,
                    'read_write_timeout' => 1800,
                    'password' => null,
                ],
                [
                    'host'     => '192.168.0.11',
                    'port'     => 6385,
                    'database' => 0,
                    'timeout'  => 15,
                    'read_write_timeout' => 1800,
                    'password' => null,
                ],
                [
                    'host'     => '192.168.0.11',
                    'port'     => 6386,
                    'database' => 0,
                    'timeout'  => 15,
                    'read_write_timeout' => 1800,
                    'password' => null,
                ]
            ],
        ],
  • 相关阅读:
    七 HBase表结构设计
    六 一行数据存储到文件的过程。
    五、数据模型特殊属性
    四 数据模型操作
    三、 数据模型概念
    二、 HBase核心功能模块。
    一、 Hbase特性 3v特性,Volume(量级) Varity(种类) Velocity(速度)
    windows下安装redis
    redis缓存穿透和缓存雪崩
    java多线程四种实现方法
  • 原文地址:https://www.cnblogs.com/dongruiha/p/8408999.html
Copyright © 2011-2022 走看看