当前位置:网站首页>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
边栏推荐
- TypeError: ‘Collection‘ object is not callable. If you meant to call the ......
- 学习笔记:Unity CustomSRP-10-Point and Spot Shadows
- 2022年最热门的招聘技术技能是什么,您绝对想不到
- 和谐宿舍(线性dp / 区间dp)
- Barcode generation and decoding, QR code generation and decoding
- 源码剖析Redis中如何使用跳表的
- SQLyog的基本使用
- C. Tree infection (simulation + greed)
- MySQL memo (for your own query)
- HRegionServer的详解
猜你喜欢
The WebService interface writes and publishes calls to the WebService interface (2)
《2021多多阅读报告》发布,95后、00后图书消费潜力攀升
JSP-----JSP简介
Traversal of tree
[2022 ICLR] Pyraformer: Low-Complexity Pyramidal Attention for Long-Range 时空序列建模和预测
项目经理值得一试的思维方式:项目成功方程式
数字化转型失败,有哪些原因?
The 8 diagrams let you see the execution sequence of async / await and promise step by step
MySQL slow query
Jupyter notebook crawling web pages
随机推荐
HRegionServer的详解
configmap
MySQL realizes row to column SQL
JS Array常见方法
View, modify and delete [database] table
scp命令详解
Basic knowledge of vegetable chicken database
Mairadb数据库基本操作之数据管理
Summary of MySQL knowledge points
MySQL views the SQL statement details executed by the optimizer
Get the number of days between dates, get the Chinese date, get the date of the next Monday of the date, get the working day, get the rest day
Uglifyjs compress JS
源码剖析Redis中如何使用跳表的
Live delivery form template - automatically display pictures - automatically associate series products
Using MySQL with Oracle
In aggregated query without group by, expression 1 of select list contains nonaggregated column
What are the redis data types
什么是指令周期,机器周期,和时钟周期?
Detailed explanation of concurrent topics
机器学习---线性回归