当前位置:网站首页>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
边栏推荐
- Interesting prime number problem hdu5750
- mysql5. 7. X data authorization leads to 1141
- Interview summary
- 深度学习笔记 —— 微调
- MySQL realizes row to column SQL
- 2021-09-23
- Cross border e-commerce | Facebook and instagram: which social media is more suitable for you?
- The concept of meta universe is popular. Is virtual real estate worth investing
- Day. JS common methods
- Logrus set log format and output function name
猜你喜欢
Making message board with PHP + MySQL
JSP-----JSP简介
低代码和无代码的注意事项
The WebService interface writes and publishes calls to the WebService interface (2)
Live delivery form template - automatically display pictures - automatically associate series products
了解 DevOps,必读这十本书!
[2022 ICLR] Pyraformer: Low-Complexity Pyramidal Attention for Long-Range 时空序列建模和预测
mariadb数据库的主从复制
AQS source code reading
Let the LAN group use the remote device
随机推荐
View, modify and delete [database] table
Backup MySQL database with Navicat
MySQL slow query
QPushButton slot function is triggered multiple times
What are the redis data types
configmap
SCP command details
Harmonious dormitory (linear DP / interval DP)
2022/4/22
2021-09-23
SQLyog的基本使用
Use the built-in function of win to transfer files between two computers in the same LAN (the speed is the same as that between local disks)
退出vim的方法
Musk and twitter storm drama
MySQL uses or to query SQL, and SQL execution is very slow
Machine learning - linear regression
引入精益管理方式,需要提前做到这九点
2022年最热门的招聘技术技能是什么,您绝对想不到
学习笔记:Unity CustomSRP-13-ColorGrading
深度学习笔记 —— 语义分割和数据集