sentinel known-replica mymaster 127.0.0.1 6380 sentinel known-replica mymaster 127.0.0.1 6381 sentinel current-epoch 4 sentinel known-sentinel mymaster 127.0.0.1 26379 db7998b0415376b03b3b1daddf9192a1ab03db6c sentinel known-sentinel mymaster 127.0.0.1 26381 07aefcb93ac7a6df48820873abb67d5c80...
sentinel known-replica mymaster 10.0.0.18 6379 sentinel known-replica mymaster 10.0.0.28 6379 sentinel current-epoch 0 查看属性 [root@slave1 ~]#ll /apps/redis/etc/sentinel.conf 更改属性 [root@slave1 ~]#chown redis.redis /apps/redis/etc/sentinel.conf 查看属性 [root@slave1 ~]#ll /apps/re...
sentinel known-replica mymaster 192.168.3.67 7002 sentinel known-replica mymaster 192.168.3.67 7000 sentinel known-sentinel mymaster 192.168.3.67 26380 d3e5e59c8665aef66c6c05e7063159ce3c566bc1 sentinel known-sentinel mymaster 192.168.3.67 26381 d0891d6429be0b8e5d75d61a9a7f1739146166f8 sentinel c...
sentinel monitor mymaster10.0.0.8163792sentinel down-after-milliseconds mymaster3000sentinel auth-pass mymaster123456sentinel config-epoch mymaster0protected-modenosupervised systemd sentinel leader-epoch mymaster0sentinel known-replica mymaster10.0.0.826379sentinel known-replica mymaster10.0.0.836379sentinel curre...
sentinel known-replica mymaster 127.0.0.1 6381sentinel known-replica mymaster 127.0.0.1 6380sentinel known-sentinel mymaster 127.0.0.1 263802b0b42c976ad59497ecd7d9b3f72a5912ac6b269 sentinel known-sentinel mymaster 127.0.0.1 26381fb21988005561a83e2a6dcc8039dfe3a6bc2e6a8 ...
sentinel monitor mymaster 127.0.0.1 6379 2 保存已建立链接的节点信息。 当sentinel 启动后,它与集群中其它节点建立了联系,它会将这些节点信息保存在配置文件里。 # sentinel.conf # slave 信息。 sentinel known-replica mymaster 127.0.0.1 6378 # sentinel B 信息。
replicaof <masterip> <masterport># 例如# replicaof 192.168.1.214 6379 查看主节点信息 启动主从节点的所有服务,查看日志即可以看到主从节点之间的服务连接。 从上面很容易就想到一个问题,既然主从复制,意味着master和slave的数据都是一样的,有数据冗余问题。
sentinel leader-epoch mymaster 1 sentinel current-epoch 1 sentinel known-sentinel mymaster 192.168.3.13 26379 8724eebeea8e30144cda27f010755458df02a6f7 sentinel known-replica mymaster 192.168.3.2 6379 sentinel known-replica mymaster 192.168.3.3 6379 ...
mymaster 0sentinel leader-epoch mymaster 0sentinel current-epoch 0sentinel known-replica mymaster127.0.0.16381sentinel known-replica mymaster127.0.0.16380sentinel known-sentinel mymaster127.0.0.126381789f7ad2247aa6104665ced751c1956e87ec175bsentinel known-sentinel mymaster127.0.0.126380e43e1bc4459a782d2049f8...
replica_port=$(echo "$replica" | cut -d' ' -f2 | sed 's/"//g') #在 Sentinel 配置中通常不需要显式配置从节点,但可以根据需要添加其他配置 # sentinel known-sentinel ${master_name} ${replica_ip} ${replica_port} done done # 打印或写入 Sentinel 配置文件 ...