redis 主从配置,读写分离,主备切换

一.配置redis集群注意要点(不限ip连接)

1.确保集群端口已经开放

2.bind 0.0.0.0,protected-mode no

3.如果存在密码,则放在公共配置中

sentinel哨兵配置要点

1.配置redis主节点并配置好哨兵数量

2.配置主备切换是需要的redis访问密码

二.配置redis集群注意要点(限本机ip连接)

1.redis.conf 设置bind 127.0.0.1

2.从属redis需配置 replicaof 127.0.0.1 port

3.从属sentinel配置 bind 127.0.0.1 monitor mymaster 127.0.0.1(!重要) port 2 protected-mode no