当前位置:网站首页>MySQL master-slave synchronous asynchronous replication semi synchronous replication full synchronous replication
MySQL master-slave synchronous asynchronous replication semi synchronous replication full synchronous replication
2022-06-29 12:24:00 【A little dog】
MySQL Master slave synchronization Asynchronous replication Semi-synchronous replication Full synchronous replication
To solve the problem of inconsistent master-slave synchronization
1、 Asynchronous replication
After the master database completes the commit transaction , Immediately execute asynchronously and return the result to the client , It doesn't matter whether it is received and processed from the library . If the processing is not received from the Library , There will still be inconsistency between master and slave data . period MySQL(5.5 before ) Only asynchronous replication is supported . And early support myisam engine .
2、 Semi-synchronous replication
The main library does not return to the client immediately after executing a transaction committed by the client , Instead, wait for at least one of the slave libraries to receive and write relay log Is returned to the client . As opposed to asynchronous replication , Semi-synchronous replication improves data security , At the same time, it also causes a certain degree of delay .
The emergence of semi synchronous replication , This is to ensure that the active and standby data are consistent at any time . As opposed to asynchronous replication , Semi synchronous replication requires the execution of every transaction , It is required that at least one standby database is successfully received , To return it to the user . The implementation principle is also very simple , After the local execution of the main database , Wait for the response message from the standby database ( It contains the latest data received by the standby database binlog(file,pos)), After receiving the standby database response message , And back to the user , Such a transaction is really completed . On the master database instance , There is a dedicated thread (ack_receiver) Receive the response message from the standby database , And notify the primary database and the standby database of the received logs through the notification mechanism , Can continue to execute .
3、 Full synchronous replication
When the master commits a transaction , All slave nodes must receive 、APPLY And commit these transactions , Then the main library thread can continue to do subsequent operations . Because you need to wait for all the transactions from the library to complete before returning , So the performance of full synchronous replication will be seriously affected .
Please correct me if there is any mistake
边栏推荐
- Go高级工程师必修课 | 真心建议你来听听,别错过~
- 东方财富证券开户安全吗 证券开户办理
- Gbase8s database into table clause
- 地球观测卫星数据
- When a technician becomes a CEO, what "bugs" should be modified?
- 黑化的蜜雪冰城,凭营销就想抓牢消费者的心?
- GBase8s数据库select有ORDER BY 子句6
- The blackened honeysnow ice city wants to grasp the hearts of consumers by marketing?
- 嵌入式数据库开发编程(四)——DDL、DML
- An interpretable geometric depth learning model for structure based protein binding site prediction
猜你喜欢

Imile uses Zadig's multi cloud environment to deploy thousands of times a week to continuously deliver global business across clouds and regions

地球观测卫星数据

智能指标驱动的管理和决策平台 Kyligence Zen 全新上线,限量内测中

Titanium dynamic technology: our Zadig landing Road

妙!妙盈科技全面实施 Zadig 助力容器化建设,全面拥抱 Kubernetes 和云原生

参加2022年杭州站Cocos Star Meetings

Do you think people who learn machinery are terrible?

AutoCAD - text display mode and how CAD can directly open Tianzheng drawings

如何查看网站已经保存的密码

LM07丨细聊期货横截面策略
随机推荐
GBase8s数据库FOR UPDATE 子句
Jerry's about TWS pairing mode configuration [chapter]
GBase8s数据库select有ORDER BY 子句5
模糊图片变清晰,一键双色图片,快速整理本地图片...这8个在线图片工具申请加入你的收藏夹!
GBase8s数据库select有ORDER BY 子句2
MySQL 主从复制原理以及流程
【综合案例】信用卡虚拟交易识别
AUTOCAD——文字显示方式、CAD怎么直接打开天正图纸
Numpy's ndarray array Foundation
面试突击61:说一下MySQL事务隔离级别?
黑化的蜜雪冰城,凭营销就想抓牢消费者的心?
Take another picture of cloud redis' improvement path
GBase8s数据库select有ORDER BY 子句6
&4 express框架
GBase8s数据库INTO STANDARD 和 INTO RAW 子句
现在怎么开户?有没有更快又安全的开通渠道
bison使用error死循环的记录
Kyligence Zen, an intelligent indicator driven management and decision-making platform, is newly launched and is in limited internal testing
Uncover the practice of Baidu intelligent test in the field of automatic test execution
GBase8s数据库select有ORDER BY 子句3