当前位置:网站首页>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 .
边栏推荐
- 论文笔记:LBCF: A Large-Scale Budget-Constrained Causal Forest Algorithm
- mac php多版本管理以及安装swoole扩展
- 远程终端控制神器——MobaXterm
- Wechat official account server configuration
- Sword finger offer 39 Numbers that occur more than half the time in the array
- A TDD example
- PLSQL storage function SQL programming
- Wireshark网卡无法找到或没有显示的问题
- Good fat man takes you to learn Flink series -flink source code analysis episode I standalone startup script analysis
- 万卷书 - 大力娃的书单
猜你喜欢
随机推荐
计网 | 形象理解路由协议RIP、OSPF、BGP
JVM內存結構
代码注释的艺术,优秀代码真的不需要注释吗?
Optimization of lazyagg query rewriting in parsing data warehouse
效应与定律
How did I raise my salary to 20k in three years?
2022云的世界会更好吗
2022-06-17 网工进阶(九)IS-IS-原理、NSAP、NET、区域划分、网络类型、开销值
Uniapp to preview pictures (single / multiple)
App测试工具大全,收藏这篇就够了
【精通高并发】深入理解C语言基础与汇编下的C语言
2022-06-17 advanced network engineering (IX) is-is- principle, NSAP, net, area division, network type, and overhead value
Redis系列——概述day1-1
Redis系列——概述day1-1
芝士糖豆打造AR潮玩新体验
Kotlin
mysql使用过程中遇到的问题
Ten thousand volumes - list of Dali wa
知道这些面试技巧,让你的测试求职少走弯路
[100 questions of Blue Bridge Cup intensive training] scratch command mobile Blue Bridge Cup scratch competition special prediction programming question intensive training simulation exercise question









