当前位置:网站首页>Master-slave replication and its principle
Master-slave replication and its principle
2022-07-29 02:35:00 【Meme_ xp】
Redis The replication function of is to support data synchronization among multiple databases . The main database can be read and write , When the data in the master database changes, it will automatically synchronize the data to the slave database . The slave database is generally read-only , It will receive data synchronized from the primary database .
1. When starting a slave node , It will send one PSYNC Command to master ;
2. If the slave node is connected to the master node for the first time , Then a full copy will be triggered . At this point, the master node will start a background thread , Start making a copy of RDB Snapshot file ;
3. It will also be from the client side client All newly received write commands are cached in memory .RDB After file generation , The master node will RDB The file is sent to the slave node , The slave node will first RDB File write to local disk , Then load it from the local disk into memory ;
4. Then the master node sends the write command cached in memory to the slave node , Synchronize this data from the node ;
5. If the network between the slave node and the master node fails , The connection is broken , Will automatically reconnect , After connection, the master node will only synchronize some missing data to the slave node .
边栏推荐
- Polygon point test
- Prometheus + alertmanager message alert
- 7/28 Gauss elimination to solve linear equations + Gauss elimination to solve XOR linear equations + find the combination number II
- Responsive Zhimeng template decoration design website
- 物联网组件
- How does the Devops team defend against API attacks?
- When synchronized encounters this thing, there is a big hole, so be careful
- How to guarantee password security? How does the secure browser manage passwords?
- ES6 event binding (v-on usage)
- 如何快速设计一套支持渲染富文本内容的跨端组件
猜你喜欢

MySQL和Redis的双写一致性

How to guarantee password security? How does the secure browser manage passwords?

千万不要把Request传递到异步线程里面,有坑

如果非要在多线程中使用 ArrayList 会发生什么?

On Multithreading

Responsive dream weaving template home decoration website

聊聊接口性能优化的11个小技巧

3D intelligent factory process flow visualization interactive display application advantages

裂开了,一次连接池参数导致的雪崩问题

Day 15 (VLAN related knowledge)
随机推荐
On Multithreading
Explain asynchronous tasks in detail: task status and lifecycle management
网络安全漏洞管理的探索与实践
Responsive Zhimeng template decoration design website
[mqtt from introduction to improvement series | 09] Wireshark packet capturing and analyzing mqtt messages
手把手教你安装VSCode(附带图解步骤)
I want to talk about high concurrency.
Prometheus + AlertManager 消息预警
3d智能工厂工艺流转可视化交互展示应用优点
工程经济学名词解释
MQTT例程
外包公司“混”了2年,我只认真做了5件事,如今顺利拿到字节 Offer。
Time pit in MySQL driver
一文搞懂 Redis 架构演化之路
redis为什么快,消息队列,单线程
NPM install reports an error: eperm: operation not permitted, rename
PS + PL heterogeneous multicore case development manual for Ti C6000 tms320c6678 DSP + zynq-7045 (2)
KBxxxxxx不一定是补丁,也可能是某个问题解决方案的描述
ES2022 的 8 个实用的新功能
线上3d数字展厅制作方案及优点