Part 1 of 7 · 1 min read
Why this page comes sixth in Level 13
In this module you will
- Say what a coordination service stores and why it is small but critical.
- Design a lock as a lease, and explain why a lease alone is not safe.
- Use fencing tokens so a paused client cannot corrupt a resource.
- Explain sessions, heartbeats, ephemeral entries and watches.
- Use the service for leader election, service discovery and configuration, and size it.
Many designs in this course quietly relied on one question: "who is the leader, and does everyone agree?" The job scheduler (page 7), the message queue (Level 12, page 1), the nearby friends hash ring (page 1) and the wallet (page 9) all use it. A small service that answers such questions is the base under many large systems. It is a replicated store (Level 5) with a few extra features. The sources are "Designing Data-Intensive Applications" by Martin Kleppmann (the chapters on distributed trouble and consensus) and "Site Reliability Engineering" (the lock service in Google's data centres). Numbers marked "made up" only show the idea.