当前位置:网站首页>What is cerebral fissure?
What is cerebral fissure?
2022-07-25 09:32:00 【yu-yuan】
The so-called brain crack problem is the high availability of multi machine hot standby HA In the system , When the heartbeat of two nodes suddenly breaks , The dispute is classified as two independent individuals , Due to the loss of contact with each other , They all think that the other party has failed , Therefore, they will compete for each other's resources , This is the brain crack problem
Take a chestnut :
A and B Two nodes clustered as a dual machine , Each holds a subset of the data of the cluster a and b , At this time , Communication between the two machines suddenly failed ,A Think B Hang up ,B Think A Hang up and appear :
(1) if A Have b Data backup , be A Complete operation data ,B Also complete operation data , This is likely to cause two nodes to read and write shared data at the same time, causing data damage
(2)A、B Each has only a、b data , Then either the two nodes cannot be started , Or start by dividing up the complete shared data
The cause of the brain crack problem :
1. Network problems -> Abnormal network problems cause physical separation of clusters , Cause brain crack
2. Node load -> if master Node load is too high , May cause master The node stops responding , Thus leaving the cluster , The cluster reselects the master , After resuming the response, there is a brain crack problem
Solutions :
1. Try to deploy the cluster in the same Intranet environment , So as to ensure the reliability of communication between nodes
2.master Node and data Node separation , Guarantee master Node responsiveness
( adopt node.master :true And node.data:false To decide whether to become master Qualification of nodes )
Redis Split brain
Explain the role of sentinels :
- Send information every other event to check whether the main server is still alive , If an uncontrollable cause causes the main server to die , It will affect the whole cluster
- So the sentinel will choose one of the slave servers to be the master server Based on the above environment , At this time, the network environment fluctuated, resulting in the death of the main server , At this time, the sentinel will start the election
- After the election, a slave server becomes the master server , And just at this time, the original master server , It's restarted , But at this time, it can only become a slave server
summary :
After the original master server receives the information from the client , You are connected before synchronizing to the slave server , But after restart, it changes from master server to slave server , Unable to synchronize data , So this part of the data is lost , This is the brain crack problem
resolvent
Add the following configuration to the configuration file
min-slaves-to-write 1
min-slaves-max-lag 10The first parameter indicates the connection to master At least slave Number ( Determine how many slave servers , Sending information only when the requirements are met avoids writing data after the main server is disconnected )
The second parameter represents slave Connect to master Maximum delay time ( Reduce the synchronization interval , The synchronization is completed before the loss of connection )
ES Cleft brain problem
Active election mechanism :
- elasticsearch Once the cluster is established , One will be elected master, Everything else is slave node . But the specific operation , Each node provides write and read operations . That is to say , No matter which node you write to , This data will also be allocated to all nodes in the cluster
- There is a situation where a node hangs , If it is slave The node hangs up , Well, first of all , Will the data be lost ? Can't . If you turn it on replicate, Then this data must be backed up on other machines . The backup partition on other nodes will be automatically upgraded to the primary partition of this partition data . It should be noted here that there will be a short period of time yellow State time
When the slave nodes find that they cannot connect with the master node , Then they will decide to elect another node as the master node
- Yes 5 Taiwan machine ,3 The desk is in a machine room ,2 It's in another machine room , When the connection between the two computer rooms is broken , The nodes of each computer room will meet by themselves , Select a master node . At this time, there are two master nodes , When the connection between the computer rooms is restored , At this time, there will be data conflicts
The solution is to set parameters :
discovery.zen.minimum_master_nodes
边栏推荐
- How to configure SSH after changing the computer
- js中map()函数的使用
- *7-2 CCF 2015-09-2 日期计算
- OverTheWire-Bandit
- Browser access to swagger failed with error err_ UNSAFE_ PORT
- sqli-labs安装 环境:ubuntu18 php7
- ~4.2 ccf 2021-12-1 序列查询
- Numpy- array属性、改变形状函数、基本运算
- @1-1 CCF 2021-04-1 灰度直方图
- [WSN communication] optimize HWSN energy-saving clustering protocol based on MATLAB biogeography [including Matlab source code, 1989]
猜你喜欢

@2-1 CCF 2020-12-01 期末预测之安全指数

How to deploy the jar package to the server? Note: whether the startup command has nohup or not has a lot to do with it

matplotlib数据可视化三分钟入门,半小时入魔?
![[WSN communication] optimize HWSN energy-saving clustering protocol based on MATLAB biogeography [including Matlab source code, 1989]](/img/47/c804acc3f8de1f0cd5938c3d889e46.png)
[WSN communication] optimize HWSN energy-saving clustering protocol based on MATLAB biogeography [including Matlab source code, 1989]

STM32+HC05串口蓝牙设计简易的蓝牙音箱

~4.2 ccf 2021-12-1 序列查询

正奇边形可划分成多少区域

MongoDB数据库文件的读与写

为什么要使用JSON.stringify()和JSON.parse()

数据预处理
随机推荐
main函数的一些操作
Understand the execution process of try, catch and finally (including return) (the most detailed analysis of the whole network)
[GPLT] 2022 大众情人(floyd)
uni-app如何获取位置信息(经纬度)
~4.2 ccf 2021-12-1 序列查询
【代码源】 每日一题 素数之欢(bfs)
Data control language (DCL)
那天帮妹纸装了个数据库。。。就又帮她整理了篇快捷键
Idea hot deployment
Flex 布局语法与用例
[selected] from simple to deep, you will understand MQ principles and application scenarios
sqli-labs Basic Challenges Less1-10
Redis database foundation
多态和接口
Dynamically add multiple tabs and initialize each tab page
OverTheWire-Natas
Week summary
@2-1 CCF 2020-12-01 期末预测之安全指数
MongoDB数据库文件的读与写
DVWA练习一 暴力破解