Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redis master-slave + sentinel configuration

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The common configurations of redis master / slave + sentinel mode are as follows:

Odd-numbered redis acts as master and slave, and odd-numbered sentinel nodes monitor redismaster nodes. If master nodes fail, master nodes can be transferred automatically. Sentinel cluster can monitor multiple sets of redis masters and slaves.

Sentinel profile redis-sentinel.conf common configuration parameters:

1.

Sentinel monitor # quorum, the new master node must meet so many votes to be elected successfully example: sentinel monitor mymaster 127.0.0.1 6379 2

two。

Sentinel down-after-millseconds # timeout for judging that a master node is not online example: sentinel down-after-millseconds mymaster 30000

3.

Sentinel parallel-syncs # after the server was promoted to the primary server, there are at most several synchronized data from the server example: sentinel parallel-syncs mymaster 1

4.

Timeout for sentinel failover-timeout # failover example: sentinel failover-timeout mymaster 180000

Connect common sentinel commands with redis-cli:

Sentinel masters lists all monitored master nodes sentinel slaves acquires all slave node information of a master node sentinel get-master-addr-by-name obtains its corresponding ip address according to the master node name sentinel reset clears all operation states, including failover sentinel failover manually transferring the master node to a node

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report