001 · MIT 6.824 / 6.5840 — Raft
| 项目 | 内容 |
|---|---|
| 学校 | MIT |
| 课程 | MIT 6.824 / 6.5840 Distributed Systems |
| 方向 | 分布式系统 / Distributed systems |
| 语言 | Go |
| 难度 | 硬核 / Advanced |
| 预计耗时 | 5–10 天 / 5–10 days |
为什么收录
Raft 要求实现共识算法:leader 选举、日志复制、持久化与安全性。难点不在代码量,而在对并发与故障的推理——这正是最能锻炼思考能力的那类题目。
Raft requires implementing consensus: leader election, log replication, persistence, and safety. The difficulty lies in reasoning about concurrency and failures — exactly the kind of problem that builds deep thinking.
English: Raft is a capstone in reasoning, not just coding: correctness under network partitions and crashes forces students to reason about invariants rather than APIs.
实测结果
- 4 项测试全部通过(选举、日志复制、leader 故障转移、分区安全)/ 4 tests pass
go test -race无数据竞争 / no data races- 详见 05-调试与测试.md 中的真实输出 / real output in chapter 05