栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

如何告诉客户端新Redis主服务器在哪里使用Sentinel

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何告诉客户端新Redis主服务器在哪里使用Sentinel

您必须在其pubsub频道之一上订阅哨兵消息。您可以在发布的链接中看到哨兵将发布消息,例如

+odown <instance details> -- The specified instance is now in Objectively Down state.-odown <instance details> -- The specified instance is no longer in Objectively Down state.+failover-takedown <instance details> -- 25% of the configured failover timeout has elapsed, but this sentinel can't see any progress, and is the new leader. It starts to act as the new leader reconfiguring the remaining slaves to replicate with the new master.+failover-triggered <instance details> -- We are starting a new failover as a the leader sentinel.

因此,当您在其中一个频道上看到一个哨兵发布时,您需要解析消息并让您的客户端做出相应的响应。Redis并不聪明-您必须使用客户端库来处理这些事情。

具体来说,最有用的渠道是

+odown+failover-detected+switch-master


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/374626.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号