“Redis Sentinel”的版本间的差异
跳到导航
跳到搜索
Jihongchang(讨论 | 贡献) (→参考) |
Jihongchang(讨论 | 贡献) |
||
第8行: | 第8行: | ||
因为涉及到选举机制,所以 Redis Sentinel 的实例至少要有3个 | 因为涉及到选举机制,所以 Redis Sentinel 的实例至少要有3个 | ||
+ | === 配置文件 === | ||
+ | |||
+ | |||
+ | === 启动 === | ||
+ | <syntaxhighlight lang="powershell"> | ||
+ | redis-server /path/to/sentinel.conf --sentinel | ||
+ | </syntaxhighlight> | ||
2023年2月19日 (日) 04:53的版本
Redis Sentinel 在不使用 Redis Cluster 时为 Redis 提供高可用性。
简单来说,Redis Sentinel 负责监控 master 和 slave,并在 master 出问题的时候从 slave 中选举一个出来作为 master 对外提供访问
注意
因为涉及到选举机制,所以 Redis Sentinel 的实例至少要有3个
配置文件
启动
redis-server /path/to/sentinel.conf --sentinel
参考
https://redis.io/docs/management/sentinel/