1024programmer Mysql What is the difference between mysql synchronous replication and asynchronous replication?

What is the difference between mysql synchronous replication and asynchronous replication?

Differences: 1. Asynchronous replication means that the Master writes events into the binlog. It does not know whether the slaves receive or process them. It cannot guarantee that all transactions are received by all slaves. 2. Synchronous replication means that the Master submits transactions until The transaction completion information will be returned to the client only after all slaves have submitted the transaction.

Related learning recommendation: mysql tutorial (video)

mysql synchronous replication and asynchronous replication The difference:

Asynchronous replication

MySQL replication is asynchronous replication by default. Master writes events to binlog and commits transactions. It does not Know whether the slave receives or not;

Disadvantage: It cannot guarantee that all transactions are received by all slaves.

Synchronous replication

Master submits the transaction, and will not return the client transaction completion information until the transaction has been submitted in all slaves;

Disadvantage: There may be a delay in completing a transaction.

Semi-synchronous replication

When the semi-synchronous replication function is enabled on the Master, at least one slave should enable its function. When the master submits a transaction to the slave, and the transaction has been written into the relay-log and flushed to the disk, the slave will notify the master that it has been received; Received, at this time the Master will automatically switch to an asynchronous replication mechanism;

Note: The semi-synchronous replication function will only work if it is enabled on the Master and the slave, only one side is enabled, and it is still asynchronous replication.

This article comes from the mysql graphic tutorial channel of 1024programmer.com, welcome to learn!

The above is the difference between mysql synchronous replication and asynchronous replication? For more details, please pay attention to other related articles on 1024programmer.com!

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/what-is-the-difference-between-mysql-synchronous-replication-and-asynchronous-replication/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索