Шпаркалка по redis и sentinel
Redis
reids-cli
| command | description |
|---|---|
| info replication | show replication status |
| slaveof |
start replication |
| slaveof no one | stop replication |
Sentinel
redis-cli -p 26379
| command | description |
|---|---|
| info | show info |
| sentinel masters | list all masters and their statuses |
| sentinel master |
master’s status |
| sentinel slaves |
all slaves and their statuses |
| sentinel sentinels | list all Sentinel instances and their statuses |
| sentinel failover | run failover manually |
| sentinel flushconfig | force Sentinel to rewrite its configuration on disk |
| sentinel monitor | add a new master |
| sentinel remove | remove master from being watched |
To add master:
sentinel monitor master01 <IP> 6379 2 sentinel set master01 down-after-milliseconds 10000 sentinel set master01 auth-pass <PASSWORD>