Lecture 06. Replication, consistency, recovery and observability
Week 11 · Syllabus and preparation from the course outline; no study date or personal lecture notes have been recorded.
Business scenario
Delivery state must survive a single replica disconnection and become consistent again after recovery.
Topics to cover in this class
- Primary-backup log replication, sequence numbers and last-applied markers
- Synchronous vs asynchronous acknowledgements and failure trade-offs
- Replay, missing-entry detection, durable storage and catch-up after reconnection
- Stale reads, data convergence, lag and write acknowledgement policies
- Correlation IDs, structured logs, p50/p95 latency, failure recovery metrics
Learning objectives
- Replicate delivery events to two backup processes.
- Verify catch-up and convergence after a bounded outage.
- Report observed consistency guarantees and recovery measurements.
Live demonstration checklist
- Create state update, watch followers apply seq numbers, stop follower and continue.
- Reconnect follower, replay gaps, compare final hash/record counts.
Preparation and optional written reflection (ungraded)
Reading focus: Watch selected parts of MIT 6.824 Primary-Backup Replication lecture; note write acknowledgement trade-offs. Optional individual reflection: If the primary acknowledges before backups receive a write, what may happen if the primary fails?
Study materials: official docs, websites and YouTube
MIT 6.5840 | Course home | https://pdos.csail.mit.edu/6.824/ Fault tolerance, replication and consistency
Official | PostgreSQL WAL concepts | https://www.postgresql.org/docs/current/wal-intro.html A real example of write-ahead logging
Official | OpenTelemetry docs | https://opentelemetry.io/docs/ Traces, metrics and correlation
Website | Designing Data-Intensive Applications | https://dataintensive.net/ Replication/consistency reading reference
YouTube | MIT Lecture 4: Primary-Backup Replication | https://www.youtube.com/watch?v=M_teob23ZzY Detailed university-level recorded lecture