MySQL Semi-synchronous Replication (Semi-synchronous Replication)

Source: Internet
Author: User

MySQL Semi-synchronous Replication (Semi-synchronous Replication) in enterprise applications, MySQL often uses a master-slave architecture or a master-master architecture to achieve load balancing of MySQL servers, improves the performance of the MySQL server. the key is that MySQL Data Synchronization and replication can be implemented to provide a convenient mechanism for enterprise data backup. By default, the replication function of MySQL5.5 is asynchronous, this means that when talking about data consistency, the master server and its slave server are independent. Asynchronous replication can provide optimal performance, because after the master server writes updated data to its binary log (Binlog) file, you can process other incoming transaction processing requests without waiting to verify that the updated data has been copied to at least one topology slave server. Although it is fast, it also brings a high risk. If a fault occurs on the master server or slave server, the data of the master server/slave server may be inconsistent, data may even be lost during restoration. MySQL5.5 introduces a semi-synchronous replication feature that ensures data consistency and redundancy between the master server and at least one slave server in the access chain. In this configuration structure, a master server and many of its slave servers are configured. In this way, in the replication topology, at least one slave server before the parent master server performs transaction processing, you must confirm that the update has been received and written into its Relay Log ). When a timeout occurs, the source master server must temporarily switch to the asynchronous replication mode and re-copy until at least one slave server set to the semi-synchronous replication mode receives the information in a timely manner. Note: 1) MySQL replication is in plain text during network upload and transmission, but SSL encryption is supported. 2) MySQL replication requires that the server IDs of the master-slave architecture cannot be the same. 3) The semi-synchronous replication mode must be enabled on both the master server and slave server; otherwise, the master server uses the asynchronous replication mode by default.

Related Article

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.