Reference · Cheat sheet
The one-page compressed essence: the binlog is a logical change feed; async means a failover can lose commits.
| redo log (0007) | binary log (0008) | |
|---|---|---|
| layer | InnoDB engine | server (all engines) |
| content | physical page changes | logical row/statement changes |
| purpose | crash recovery (1 server) | replication & PITR (many servers) |
redo heals one server · binlog copies one server to another. Undo = rollback + MVCC.
| Mode | Source commit waits for… | Failover data loss |
|---|---|---|
| async (default) | nothing | can lose acknowledged commits |
| semisync | ≥1 replica to receive (relay log), not apply | committed txns reached ≥1 replica |
Semisync cost = one network round-trip of commit latency. "Received" ≠ "applied" — a replica can still lag on applying.
Source: MySQL 8.0 Manual — Replication · Semisynchronous Replication · The Binary Log · All lessons