当前位置:网站首页>Semi synchronous replication of MariaDB
Semi synchronous replication of MariaDB
2022-04-23 05:15:00 【jks212454】
Mariadb Semi-synchronous replication of
- One 、 To configure mariadb Master-slave replication of
- Two 、 The principle of semi synchronous replication
- 3、 ... and 、 Main storage failure , Promote the method of slave library and master library
- Four 、 The difference between asynchronous replication and semi synchronous replication
- 5、 ... and 、mariadb Semi synchronous configuration
One 、 To configure mariadb Master-slave replication of
mariadb Master-slave replication of
Two 、 The principle of semi synchronous replication
Solve the inconsistency between master and slave database data , Main database data hang up , Inconsistent data from the database
resolvent : Semi-synchronous replication
In a semi synchronous replication scenario ,master Will monitor all slave, Ensure that at least one of the data is fully synchronized successfully ,master Will return the client information , This data was written successfully .
3、 ... and 、 Main storage failure , Promote the method of slave library and master library
1.keepalived Switch
VIP,
adopt keepalived Judging scripts , Execution switching VIP
2. Through semi synchronous replication
Three nodes are required , One master and two slaves , Automatic switch , One of them slave Turn on semi synchronous replication
Four 、 The difference between asynchronous replication and semi synchronous replication
1. Asynchronous replication
Asynchronous replication :
Simply speaking , Namely master hold binlog Send past , No matter slave Whether to accept , No matter the execution is finished , This action is over .
2. Semi-synchronous replication
Semi-synchronous replication :
master hold binlog Send past ,slave Confirm that... Has been received , But whether it's done or not , Will give master Send a message, I received , This action is over .
3. Disadvantages of asynchrony
Disadvantages of asynchrony :
When master When the write operation is busy , When the write up operation is busy , At present Pos Point e.g 10, and
slave, On I0_ THREAD The thread receives 3, here master Downtime , Will cause a difference 7 individual
Point not transferred to slave And data loss .
5、 ... and 、mariadb Semi synchronous configuration
1.master To configure
① Turn on the master database semi synchronization
MariaDB [(none)]> set global rpl_semi_sync_master_enabled = 1;
Query OK, 0 rows affected (0.058 sec)
② Length of time to wait for response from the library
MariaDB [(none)]> set global rpl_semi_sync_master_timeout = 3000;
Query OK, 0 rows affected (0.000 sec)
2.slave To configure
① Enable semi synchronous replication from the library
MariaDB [(none)]> set global rpl_semi_sync_slave_enabled = 1;
Query OK, 0 rows affected (0.296 sec)
② Restart from the library
MariaDB [(none)]> stop slave;
Query OK, 0 rows affected (0.484 sec)
MariaDB [(none)]> start slave;
Query OK, 0 rows affected (0.258 sec)
MariaDB [(none)]>
版权声明
本文为[jks212454]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230513597118.html
边栏推荐
- 2021 年 25 大 DevOps 工具(下)
- Unity C e-learning (IV)
- Asynchronous iterator & asynchronous generator & asynchronous context manager
- Luogu p2731 horse riding fence repair
- The difference between static pipeline and dynamic pipeline
- 学习笔记:Unity CustomSRP-13-ColorGrading
- 何时适合进行自动化测试?(下)
- Cross border e-commerce | Facebook and instagram: which social media is more suitable for you?
- Various ways of writing timed tasks of small programs
- C language hash dictionary and notes
猜你喜欢

Where, on when MySQL external connection is used

何时适合进行自动化测试?(下)

深度学习笔记 —— 语义分割和数据集

Making message board with PHP + MySQL

Define defines constants and macros, pointers and structures

4 个最常见的自动化测试挑战及应对措施

项目经理值得一试的思维方式:项目成功方程式

Power consumption parameters of Jinbei household mute box series

改进DevSecOps框架的 5 大关键技术

MySQL foreign key constraint
随机推荐
MySQL circularly adds sequence numbers according to the values of a column
Various ways of writing timed tasks of small programs
工具在数字化转型中扮演了什么样的角色?
Jupyter notebook crawling web pages
MySQL basics 3
Chapter III project schedule management of information system project manager summary
Define defines constants and macros, pointers and structures
Chapter I overall project management of information system project manager summary
7-4 is it too fat (10 points) PTA
和谐宿舍(线性dp / 区间dp)
Publish your own wheel - pypi packaging upload practice
多线程基本概念(并发与并行、线程与进程)和入门案例
学习笔记:Unity CustomSRP-12-HDR
Collaboration future object and concurrent futures
Use AES encryption - reuse the wisdom of predecessors
Basic theory of Flink
MySQL views the SQL statement details executed by the optimizer
Detailed explanation of concurrent topics
Transaction isolation level of MySQL transactions
C. Tree Infection(模拟+贪心)