# Yoshinori Matsunobu - Semi-Synchronous Replication at Facebook (Highlights)

## Metadata
**Review**:: [readwise.io](https://readwise.io/bookreview/56062737)
**Source**:: #from/readwise #from/reader
**Zettel**:: #zettel/fleeting
**Status**:: #x
**Authors**:: [[Yoshinori Matsunobu]]
**Full Title**:: Semi-Synchronous Replication at Facebook
**Category**:: #articles #readwise/articles
**Category Icon**:: 📰
**URL**:: [yoshinorimatsunobu.blogspot.com](https://yoshinorimatsunobu.blogspot.com/2014/04/semi-synchronous-replication-at-facebook.html)
**Host**:: [[yoshinorimatsunobu.blogspot.com]]
**Highlighted**:: [[2025-11-05]]
**Created**:: [[2025-11-07]]
## Highlights
- In MySQL 5.6, GTID based failover is also possible. ([View Highlight](https://read.readwise.io/read/01k9a2ab2s0nfr50rn1ztj4h8y)) ^954612993
GTID: Global Transaction Identifiers
- MySQL replication is asynchronous. So there is a very serious disadvantage -- potential data loss risk on master failover. ([View Highlight](https://read.readwise.io/read/01k9a2b43cy9ttn8fh98vza6h8)) ^954613049
- Always set fully durable settings on master. By fully durable I mean setting innodb_flush_log_at_trx_commit=1 and sync_binlog=1. ([View Highlight](https://read.readwise.io/read/01k9a2btaq727ytqnwbvhsetwh)) ^954613066
- If you do not care about data loss risk, there is no reason to use Semi-Synchronous replication. ([View Highlight](https://read.readwise.io/read/01k9a2de55cxpv97dr587rzj4f)) ^954613134
- On normal semisync(AFTER_COMMIT), committing to InnoDB is done before waiting for ack from semisync slave, so the committed rows are visible from applications, even though semisync slaves may not have received the data ([View Highlight](https://read.readwise.io/read/01k9a2gsabb7nt0e0k1gtdwqyq)) ^954613317
- Loss-less semisync (AFTER_SYNC) avoids the problem. Loss-less semisync commits InnoDB after getting ack from one of semisync slaves. So when committed data is visible from applications, one of the semisync slaves have received that. ([View Highlight](https://read.readwise.io/read/01k9a2hje536nz5wf8fvvfeexr)) ^954613355
- When you do fast failover, you can set reduced durable settings on master as well as slaves. Reduced durability means innodb_flush_log_at_trx_commit != 1 and sync_binlog != 1. With Semi-Synchronous replication, you can immediately start failover when master is down. ([View Highlight](https://read.readwise.io/read/01k9a2jjxfef0pxzex6280as1w)) ^954613399
- When semisync is enabled, round-trip time(RTT) between master and one of the semisync slaves is added to transaction commit latency. ([View Highlight](https://read.readwise.io/read/01k9a2m7jvnpazmab5wgb1jnb8)) ^954613478
- If you want to enable semisync always, you make sure these scenario won't happen. Set infinite or very long timeout, and have at least two semisync readers. ([View Highlight](https://read.readwise.io/read/01k9a2n46rsdd6387w80021y5c)) ^954613536