当前位置:网站首页>PSYNC command of redis
PSYNC command of redis
2022-06-25 17:08:00 【Hua Weiyun】
Redis Of PSYNC command
The replication from the secondary server to the primary server is divided into initial replication and re replication after disconnection , The initial replication refers to that the slave server has not replicated any master server or that the master server to be replicated by the slave server is different from the master server replicated last time
The replication system after disconnection is that the master and slave servers interrupt the replication in the command propagation stage , After the secondary server reconnects to the primary server through automatic reconnection, continue to replicate the primary server .
SYNC Copy command
SYNC Copying commands is a resource intensive operation , Because the primary server needs to execute BGSAVE Command to generate RDB file , This build operation consumes a lot of the main server CPU、 Memory and disk IO resources , The master server will generate itself RDB Sending files to the slave server will consume a lot of network resources from the master and slave servers , Impact on the time when the primary server responds to command requests , receive RDB The slave server of the file needs to load the file sent by the master server RDB file , Command requests cannot be processed during load .
PSYNC command
Redis 2.8 Use later PSYNC Command instead of SYNC command ,PSYNC Complete resynchronization and partial resynchronization , Full resynchronization is used to handle initial replication , and SYNC The command steps are basically the same , Are created and sent by the master server RDB file , Send the write command saved in the buffer to the slave server for synchronization , Partial resynchronization is used to deal with the situation of duplication after disconnection : When the slave server reconnects to the master server after disconnection , The master server sends the write command executed during the disconnection of the master server and the slave server to the slave server , As long as the slave server receives and executes these write commands, it can update the database to the current state of the master server .
SYNC The command needs to generate, transfer, and load the entire RDB file , Partial resynchronization only needs to send the missing write command from the slave server to the slave server for execution .
summary
In this article, we talked about Redis Copy , adopt redis Of SYNC Copy command import PSYNC command ,PSYNC replace SYNC The command has full resynchronization and partial resynchronization , I hope this article will help you
️ Thank you for your
If you think this is helpful for you :
- Welcome to follow me ️, give the thumbs-up , Comment on , forward
- Focus on
Panpan small class, Push good articles for you regularly , There are also group chat and irregular lottery activities , You can say what you want , Communicate with the great gods , Learning together . - If there is anything inappropriate, you are welcome to criticize and correct .
边栏推荐
- Involution? Foam? Change? Ten questions directly hit the core puzzle of "meta universe" – the essence of "ask ta- Wang Lei about the time of the universe"
- Vscode plug-in self use
- 单例模式应用
- Home office earned me C | community essay
- 千万级购物车系统缓存架构方案
- Perfect shuffle problem
- 剑指 Offer II 025. 链表中的两数相加
- 批量--07---断点重提
- SMART PLC如何构造ALT指令
- Using pywebio testing, novice testers can also make their own testing tools
猜你喜欢
随机推荐
Effects and laws
单例模式应用
Tensorflow old version
Involution? Foam? Change? Ten questions directly hit the core puzzle of "meta universe" – the essence of "ask ta- Wang Lei about the time of the universe"
How do components communicate
1-8Vmware中的文件共享
剑指 Offer 39. 数组中出现次数超过一半的数字
Notes: lbcf: a Large Scale budget Constrained causal Forest Algorithm
万卷书 - 大力娃的书单
On Web 3.0
Internship: the annotation under swagger involves the provision of interfaces
计网 | 形象理解路由协议RIP、OSPF、BGP
协议和分层次
Wechat official account server configuration
Good fat man takes you to learn Flink series -flink source code analysis episode I standalone startup script analysis
Why are there few embedded system designers in the soft test?
[micro service sentinel] overview of flow control rules | detailed explanation of flow control mode for source | < direct link >
"Podcast with relish" 386 Yuan Tang Hua Yuan Shi: who is not a "Mr. White character"?
Redis 的PSYNC命令
internship:Swagger下注解的涉及 接口的提供









