etcd 00:00:01 A ferry terminal saves berth seven The dispatch system changes a small piece of coordination state. The client cares whether its update survived, not which member received the request. In this three-voter etcd cluster the leader orders writes through Raft. The client sends a put. A follower would pass it on to the leader. The leader proposes the next entry and replicates it to followers while persisting its own log. A majority now durably has the entry from the leader's current term. The state machine can commit and apply it. The leader applies it. The store's revision rises and watchers are told. The next message tells followers the commit point. Follower 2 was slow and catches up. Log position seven identifies an entry in this example. A key-value store revision is the version of the applied keyspace. The two numbers serve different purposes and need not be equal. 00:00:56 Catch up a passenger display without a gap A display first lists registered services at revision six. Another berth can open between that read and the start of a watch. Ask for the next revision explicitly so a change in that interval can still arrive. The client reads the prefix: one service, as of revision 6. It opens a stream that starts at revision 7. A new service b arrives as event 7. The link drops before the display observes revision eight deleting the first service. Its local list is temporarily old. Reconnect from revision eight. The deletion removes the stale service exactly where the local record fell behind. Had history up to 20 been compacted meanwhile, the server would say so, and the client would list again. Save the last processed revision and resume after it. If the required history has been compacted, rebuild from a fresh consistent list and restart the watch from that revision's successor. 00:01:55 A service address with an expiry date A service registers its address under a lease. Here the granted lifetime is ten seconds, and a healthy service renews before that deadline. Its address is therefore an expiring claim about presence. The service gets a lease and writes its address on it. In this trace the service renews every three seconds, keeping the lease alive. An actual crash stops renewal. It does not immediately remove the key. Time is up. The leader revokes the lease through the log, so all members delete the key and watchers see it. When the leader revokes the expired lease, attached keys are deleted through the replicated store and a watch can observe the deletion. A caller still needs a timeout during the interval before the registration disappears. 00:02:40 History grows even while one key keeps changing The dispatcher updates one busy key repeatedly. Its current value is tiny, but historical revisions occupy space. A storage quota alarm can interrupt new writes long before somebody notices a sluggish display. The same key is written over and over. Every version is kept. A no-space alarm restricts writes while the operator investigates quota and storage use. Old revisions are dropped. The file is full of holes but no smaller. Defragment a member with care. Its requests may pause during the operation, so preserve quorum and monitor progress. Clear the alarm, then set auto compaction, for example one hour. Compaction removes obsolete history from the logical store. Defragmentation returns unused space within a member's backend file. Plan that maintenance one member at a time and verify available capacity before clearing an alarm. 00:03:40 Count votes before announcing recovery The port grows to five voting members. Lose two: three remain. Lose a third, and only two can communicate. Predict both the write behavior and what a local reader might still see. All are up. Three remain, exactly a majority. Writes continue. Two members out of five cannot establish a quorum. New writes and linearizable reads cannot complete in that partition. Three again: they elect a leader and continue by themselves. With a majority restored, normal consensus can resume after the necessary election. A local serializable read may have been available without quorum, but it could have been stale. Choose that trade only when the passenger display can tolerate it.