A brief analysis of MySQL semi-synchronous replication for MySQL database learning

Source: Internet
Author: User

starting with version 5.7 MySQL supports semi-synchronous replication by extension, and when the primary library performs an update operation transaction, the commit operation is blocked until at least one semi-synchronous, replication Slave confirms that the update operation is received, the primary library's commit operation continues, and the semi-synchronous slave send acknowledgement message is only This update operation record has been recorded to the local relay log, if there is no slave send a confirmation messageWhen a timeout occurs, the semi-synchronous copy is converted to asynchronous replication.

Semi-synchronous replication can have an impact on MySQL performance because the commit action of the main library can only be performed after receiving at least one acknowledgement from the library. But this feature is a tradeoff between performance and data reliability.

The Rpl_semi_sync_master_wait_point parameter is used to control the behavior of semi-synchronous replication:

After_sync: Default Value

After_commit

The system parameters that need to be configured include:

Rpl_semi_sync_master_enabled: In the main library configuration, make sure that the semi-synchronous copy function of the main library is turned on

Rpl_semi_sync_master_timeout: Configures the main library to wait a few milliseconds to secure the acknowledgement of receiving the standby, and when this time is exceeded, the semi-synchronous becomes asynchronous

Rpl_semi_sync_slave_enabled: In the configuration from the library, make sure that the semi-synchronous copy function from the library is turned on

Internet companies mostly use the database is MySQL, want to stand out from the many IT workers, need to have advanced technology, learning to add value is essential. The way of learning is your insistence. The old boy education MySQL DBA course, after several updates the course, put an end to the paper, the whole enterprise real case unifies the theory instruction, wants to study the MySQL dba 's knowledge deeply, Can pay attention to the old boy education .



A brief analysis of MySQL semi-synchronous replication for MySQL database learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.