Comparing MySQL's asynchronous replication, full synchronous replication and semi-synchronous replication

Asynchronous, fully synchronous and semi-synchronous replication of MySQL

  • Asynchronous replication

Asynchronous replication, the main library writes transaction Binlog events to the Binlog file. At this time, the main library will only notify the Dump thread to send these new Binlogs, and then the main library will continue to process the commit operation, and these Binlogs will not be guaranteed at this time. to any node.

  • Full synchronous replication

Fully synchronous replication, after the master library commits transactions, all slave library nodes must receive, APPLY, and submit these transactions, and then the master library thread can continue to do follow-up operations. But the disadvantage is that the time for the main library to complete a transaction will be stretched and the performance will be reduced.

  • semi-synchronous replication

Semi-synchronous replication is a type between full synchronous replication and full asynchronous replication. The main library only needs to wait for at least one slave node to receive and Flush Binlog to the Relay Log file. The main library does not need to wait for all slave libraries. Feedback to the main library. At the same time, this is just a received feedback, not a fully completed and submitted feedback, which saves a lot of time.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324840939&siteId=291194637