Why MySQL Group Replication Beats Semi‑Sync: Benchmark Results and Traffic Analysis
A practical benchmark on three identical servers shows MySQL Group Replication achieving higher TPS than Semi‑Sync despite larger network traffic, and explains how Paxos‑based parallel log transmission gives it an edge over the single‑threaded Semi‑Sync approach.
Background
MySQL Group Replication (GR) uses the Paxos protocol for inter‑node communication and performs conflict checking even in single‑primary mode, making its communication model more complex than Semi‑sync replication.
Test Environment
Three identical servers, each running MySQL with both Semi‑sync and Group Replication enabled; InnoDB buffer pool size identical.
Workload generated by Sysbench using the same test script for both configurations.
Group Replication Results
TPS: 8887 . Minimum response time: 0.99 ms . Maximum response time: 1260.68 ms .
Semi‑sync Results
Configuration: 1 primary + 2 replicas, rpl_semi_sync_master_wait_for_slave_count=1. TPS: 7555 . Minimum response time: 0.84 ms . Maximum response time: 228.44 ms . Average response time: 3.97 ms .
Network Traffic Comparison
Secondary node in GR receives ≈12.5 MB/s and sends ≈5.1 MB/s. Semi‑sync secondary receives ≈4.08 MB/s and sends ≈183 KB/s.
Why Group Replication Achieves Higher Throughput
Both replication modes commit the transaction to the binary log on the primary before replication. The performance difference lies in how the binary log is transmitted:
GR distributes the binlog to replicas through multiple Paxos machines that can send log events in parallel, reducing per‑event latency.
Semi‑sync uses a single thread to handle acknowledgments and streams events sequentially, limiting parallelism and increasing overhead.
Implications
If Semi‑sync adopted a parallel log‑sending mechanism similar to GR, its throughput could approach or exceed that of GR, because the only extra cost of Semi‑sync over asynchronous replication is waiting for one acknowledgment.
Conclusion
The benchmark demonstrates that, contrary to the common belief that Semi‑sync is faster, MySQL Group Replication can deliver higher TPS despite higher network traffic, confirming the efficiency of its Paxos‑based communication design and highlighting optimization opportunities for Semi‑sync.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
dbaplus Community
Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
