当前位置:网站首页>Redis cluster (master-slave) brain crack and solution
Redis cluster (master-slave) brain crack and solution
2022-07-05 11:44:00 【We've been on the road】
1 Cluster cleft brain
redis The cluster brain crack refers to the network problem , Lead to redis master The node follows redis slave Nodes and sentinel Clusters are in different network partitions , At this time because sentinel The cluster cannot perceive master The existence of , So will slave The node is promoted to master node . There are two different master node , It's like one brain split into two .
In the cluster cleft problem , If the client is still based on the original master The node continues to write data , So new master Nodes will not be able to synchronize this data , When the network problem is solved ,sentinel The cluster will be the original master The node is reduced to slave node , Now it's time to start again master Data synchronization in , It will cause a lot of data loss .

2 Solution
redis In the configuration file , There are two parameters :
min-slaves-to-write 3 min-slaves-max-lag 10
- The first parameter indicates the connection to master At least slave Number
- The second parameter represents slave Connect to master Maximum delay time
Follow the above configuration , At least 3 individual slave node , And the delay of data replication and synchronization cannot exceed 10 second , Otherwise master Will refuse to write the request , After configuring these two parameters , If cluster cleft occurs , The original master When the node receives a write request from the client, it will reject , Data loss after data synchronization can be reduced .
Be careful : Newer versions of redis.conf The parameters in the file become
min-replicas-to-write 3 min-replicas-max-lag 10
redis These two parameters can also be used for data loss in the case of asynchronous replication in .
</article>
边栏推荐
- pytorch-权重衰退(weight decay)和丢弃法(dropout)
- What about SSL certificate errors? Solutions to common SSL certificate errors in browsers
- 1.php的laravel创建项目
- How did the situation that NFT trading market mainly uses eth standard for trading come into being?
- Solve readobjectstart: expect {or N, but found n, error found in 1 byte of
- Redis集群的重定向
- ACID事务理论
- COMSOL -- establishment of geometric model -- establishment of two-dimensional graphics
- 【L1、L2、smooth L1三类损失函数】
- 分类TAB商品流多目标排序模型的演进
猜你喜欢

Yolov5 target detection neural network -- calculation principle of loss function

【yolov3损失函数】

How did the situation that NFT trading market mainly uses eth standard for trading come into being?

AutoCAD -- mask command, how to use CAD to locally enlarge drawings

Evolution of multi-objective sorting model for classified tab commodity flow
![[upsampling method opencv interpolation]](/img/6b/5e8f3c2844f0cbbbf03022e0efd5f0.png)
[upsampling method opencv interpolation]

【主流Nivida显卡深度学习/强化学习/AI算力汇总】

【上采样方式-OpenCV插值】

12. (map data) cesium city building map

NFT 交易市场主要使用 ETH 本位进行交易的局面是如何形成的?
随机推荐
Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in
【上采样方式-OpenCV插值】
【yolov5.yaml解析】
Sklearn model sorting
[leetcode] wild card matching
COMSOL -- 3D casual painting -- sweeping
管理多个Instagram帐户防关联小技巧大分享
全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
无线WIFI学习型8路发射遥控模块
【无标题】
Web API配置自定义路由
【yolov3损失函数】
redis的持久化机制原理
【 YOLOv3中Loss部分计算】
11.(地图数据篇)OSM数据如何下载使用
How to protect user privacy without password authentication?
What about SSL certificate errors? Solutions to common SSL certificate errors in browsers
中非 钻石副石怎么镶嵌,才能既安全又好看?
How to make your products as expensive as possible
【L1、L2、smooth L1三类损失函数】