The Sentinel of Redis

Source: Internet
Author: User
Tags failover

first, the Sentinel of RedisThe Redis Sentinel system is used to manage multiple Redis servers, which perform three main tasks1: Monitoring2: Reminders3: Automatic failover Second, configure SentinelModify sentinel.conf File Sentinel Monitor MyMaster 192.168.1.170 6379 2 (2 means: 2 votes to judge the objective Downline) Start Sentinelredis-sentinel sentinel.conf Sentinel Log Detail Description http://redisdoc.com/topic/sentinel.html perform the following command to view the Redis master-slave information
[[Email protected] vagrant]#Redis-Cli-H192.168.9.17 -P26379InfoSentinel# SentinelSentinel_masters:1sentinel_tilt:0sentinel_running_ Scripts:0sentinel_scripts_queue_length : 0master0:name=master1,status=ok ,address=192.168.< Span class= "lit" >9.18:6379,slaves=1,sentinels= 1                
Three, the principleSubjective downline and objective downline Iv. Some of Sentinel's commands

INFO
Sentinel's basic status information
SENTINEL Masters
Lists all monitored primary servers, and the current status of these primary servers
SENTINEL Slaves <master name>
Lists all slave servers for a given primary server, and the current state of those from the server
SENTINEL get-master-addr-by-name <master name>
Returns the IP address and port number of the primary server for the given name
SENTINEL Reset <pattern>
Resets all names to the primary server that match the given pattern pattern. The reset operation clears all current state of the primary server, including the failover in progress, and removes all the slave servers and Sentinel from the primary server that are currently discovered and associated.
SENTINEL Failover <master name>
When the primary server fails, forces an automatic failover to start without asking other Sentinel comments, but it sends an up-to-date configuration to other Sentinel, and other Sentinel updates are based on this configuration

V. Java Operations Sentinel Reference: http://blog.csdn.net/pi9nc/article/details/17735653

The Sentinel of Redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.