当前位置:网站首页>Redis master-slave replication - mentality detection mechanism
Redis master-slave replication - mentality detection mechanism
2022-06-13 07:35:00 【A hard-working dog】
The heartbeat detection
When synchronization is complete , The master slave server enters the command propagation phase , At this time, the master server should always send its own write commands to the server , As long as the slave server always receives and executes the write command sent by the master server , The data consistency of the master and slave servers can be ensured .
In the command propagation phase , From the server The default is once per second , To the primary server dispatch orders .
REPLCONF ACK <replication_offset>
REPLCONF ACK The command has three functions for the master and slave servers :
- Check the network connection status of the master-slave server
- Aided implementation min-slaves Options
- Detection command lost
Detect the network connection status of the master-slave server
If the primary server doesn't receive from the server for more than a second REPLCONF ACK command , Then the primary server will think that there is something wrong with the connection .
Aided implementation min-slaves configuration option
Redis Of min-slaves-to-write and min-slaves-max-lag Two options prevent the primary server from executing write commands without security
Detection command lost
If it's due to a network failure , The write command propagated from the master server to the slave server is lost in half way , So when the slave server sends to the master server REPLCONF ACK<replication_offset> On command , The master server will find that the current offset of the slave server is less than its own offset , The primary server then submits the copy offset from the secondary server , Find the missing data from the server in the replication buffer , And send these data to the slave server .
边栏推荐
- Logback log framework learning and problems
- Simple understanding of basic language of C language
- C # Advanced Programming - Feature Section
- 25个国内外文献数据库
- Postgraduate entrance examination English
- Priority analysis of list variables in ansible playbook and how to separate and summarize list variables
- FTP_ Manipulate remote files
- [splashsplash] repeat the script that outputs splashsurf
- MySQL summary
- JMeter encryption interface test
猜你喜欢

全志V3S环境编译开发流程

Redis learning journey -- getting to know redis for the first time

Powerdispatcher reverse generation of Oracle data model

RT thread simulator lvgl control: slider control

Find the first and last positions of elements in a sorted array

Precautions for passing parameters with byte array

Logback log framework learning and problems

Redis learning journey --redis Conf details

论文笔记: 多标签学习 BP-MLL

redis-3. Redis list, set, hash, sorted_ set、skiplist
随机推荐
How to write an amazing design document?
DM Experiment 6: filter replication
C drawing table and sending mail function
MySQL does not recommend setting the column default value to null. Why on earth is this
Redis learning journey master-slave replication
[log4j2 log framework] sensitive character filtering
How to solve the 404 problem
Functions about Oracle.
redis-5. Redis' RDB, fork, copyonwrite, AOF, RDB & AOF are mixed
Simple understanding of basic language of C language
Un des backtraders du cadre de quantification lit l'analyseur
25个国内外文献数据库
25 domestic and foreign literature databases
Compilation and development process of Quanzhi v3s environment
How to use clion to debug a project built by the make tool
Database outline
An example of CSRF attack defense in web application scenarios
c#高級編程-特性篇
. Net code to implement get request and post request
Powerdispatcher reverse generation of Oracle data model