Databases 3 min read

Mastering MySQL Replication: Asynchronous, Semi‑Sync, and Full Sync Explained

This article explains MySQL master‑slave replication, covering asynchronous, semi‑synchronous, and full synchronous modes, their mechanisms, advantages, disadvantages, and ideal use cases for high availability, read/write separation, and strong consistency in large‑scale systems.

Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Mastering MySQL Replication: Asynchronous, Semi‑Sync, and Full Sync Explained

MySQL Replication Overview

MySQL is a core component of large‑scale architectures, and its master‑slave replication is essential for achieving high availability, performance, and read/write separation.

MySQL replication architecture diagram
MySQL replication architecture diagram

The master records operations in the binary log (Binlog), and the slave replays these logs to synchronize data. This model supports read/write separation, disaster recovery, and high‑availability designs.

Asynchronous Replication

By default, MySQL uses asynchronous replication. After the master commits a transaction, it immediately returns success, while the slave asynchronously pulls and replays the Binlog.

Asynchronous replication diagram
Asynchronous replication diagram

Advantages: highest performance, no waiting on the master. Disadvantages: noticeable replication lag; master failure can cause data loss. Suitable scenarios: read‑heavy, write‑light workloads where some delay is acceptable.

Semi‑Synchronous Replication

Semi‑synchronous replication requires the master to wait until at least one slave acknowledges receipt of the Binlog before confirming the transaction.

Semi‑synchronous replication diagram
Semi‑synchronous replication diagram

Advantages: reduces risk of data loss. Disadvantages: slightly slower than asynchronous mode. Suitable scenarios: internet systems with moderate latency requirements.

Full Synchronous Replication

Full (write‑time) synchronous replication forces the master to wait for acknowledgments from all slaves before committing, ensuring complete data consistency.

Full synchronous replication diagram
Full synchronous replication diagram

Advantages: strong data consistency. Disadvantages: high performance cost, unsuitable for high‑concurrency scenarios. Suitable scenarios: financial‑grade applications requiring strict consistency, such as transaction systems.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

high availabilityDatabase ArchitectureMySQLReplicationRead-Write Separation
Mike Chen's Internet Architecture
Written by

Mike Chen's Internet Architecture

Over ten years of BAT architecture experience, shared generously!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.