配置Redis前哨

时间:2019-06-07 22:35:00

标签: windows redis redis-sentinel

我有一个主人和一个奴隶,我希望与哨兵一起认识到,当老师失败时,奴隶代替他的位置,也就是说成为主人

主节点

bind 127.0.0.10
port 6380
protected-mode no
#logfile "./logs/tabla.log"
tcp-backlog 511
timeout 0
tcp-keepalive 0
loglevel notice
databases 20
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename "nodo1.rdb"
dir "C:\\Program Files\\Redis"
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes



奴隶奴隶

bind 127.1.1.10
port 6379
protected-mode no
slaveof 127.0.0.10 6380
#logfile "./logs/tabla.log"
tcp-backlog 511
timeout 0
tcp-keepalive 0
loglevel notice
databases 20
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename "TablaEjemplo.rdb"
dir "C:\\Program Files\\Redis"
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes

sentinel1

protected-mode no
port 26379

sentinel myid 95a2aa9a99b007ffa316b53966341440d49f283c
sentinel monitor mymaster 127.0.0.10 6380 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 10000
sentinel config-epoch mymaster 0
sentinel leader-epoch mymaster 0
sentinel parallel-syncs mymaster 1

sentinel2

protected-mode no
port 26380

sentinel myid 95a2aa9a99b007ffa316b53966341440d49f283c
sentinel monitor mymaster 172.16.81.98 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 10000
#sentinel known-slave mymaster 127.0.0.2 6379
sentinel parallel-syncs mymaster 1

#logfile "/logs/sentinel2.log"

我正在寻找如果主服务器失败,则从服务器可以成为主服务器,如果主服务器返回,它将成为从服务器。 目前,它仅在从属发生故障时起作用,而该从属发生故障时,主返回将其作为从属返回 在此之前,我感谢任何提示或帮助 谢谢

0 个答案:

没有答案