当前位置:网站首页>Redis master-slave synchronization mechanism
Redis master-slave synchronization mechanism
2022-07-24 00:19:00 【A little dog】
Redis Master slave synchronization mechanism
Redis Master slave synchronization mechanism

Copy in full
stay slave From the service initialization stage , Need to put master All replicates on the master server are replicated , technological process :
- Connect from the slave server to the master server , And send the psync command
- The master server received psync After the command , perform bgsave Command to generate RDB file , And record all subsequent recording operations in the buffer
- master After execution bgsave after ,master take RDB The document is sent to slave, And continue to write in the buffer during this stage
- slave On receiving RDB Before document , Will discard all its own data , load RDB
- master sent , Will send to slave Buffer send of Write execute command
- slave Finish right RDB Loading of , Start accepting command requests , And execute the command of buffer
Incremental replication
stay slave After initialization and normal operation ,master The writes that occur will be synchronized to slave On
For incremental replication, only the data in the squeeze buffer is copied , If the master-slave node offset Gap is too large , It may lead to the need to use full replication .
Please correct me if there is any mistake
边栏推荐
- Happiness of progress and growth
- 文本和图片的绘制、数据存储、localStorage、sessionStorage、cookie三者的区别
- As a programmer, is there anything you want to say to the newcomer?
- Redis数据结构
- Nacos
- Gbase 8C session information function (III)
- Input and output of ACM mode
- 2022年7月23日——mapper文件说明
- GBase 8c系统表信息函数(二)
- C language explanation series -- understanding of functions (2) how to use functions to exchange the values of two integer variables
猜你喜欢

php实现 Stripe订阅

【HCIP】MGRE环境下OSPF实验,含多进程双向重发布及OSPF特殊区域

Linked list - 707. Design linked list

Multi knapsack explanation of dynamic programming knapsack problem

数仓数据标准详解-2022

Jenkins uses sonarqube to build pipeline code review project

July 23, 2022 - mapper file description

kubernetes error

jenkins下使用声明式(Declarative)和Jenkinsfile的方式构建Pipeline流水线项目

Redis 集群hash分片算法(槽位定位算法)
随机推荐
子矩阵的和
Gbase 8C binary string operator
GBase 8c 字符串操作符
Application of encryption technology
【低代码】低代码发展的局限性
腾讯将关闭“幻核”,数字藏品领域发展是否面临阻力?
Scheme for importing XMIND use cases into tapd (with code)
sed 深入理解与使用
Adaptation scheme of large screen visualization
Gbase 8C mode visibility query function (2)
Gbase 8C session information function (III)
Take stock of 10 new layer1 to prepare for the next bull market
GBase 8c系统表信息函数(一)
Mobile terminal H5 - a lifeline timeline
盘点为下个牛市做准备的10个新Layer1
Cloud native concept
Super simple training of force deduction and problem brushing
Gbase 8C session information function (6)
GBase 8c 会话信息函数(六)
Summarize the plan, clarify the direction, concentrate and start a new situation -- the Counterpart Assistance Project of hexu software has achieved remarkable results