This lecture is about using consensus to implement state machine replication. It starts by defining the problem and presenting a simple solution for synchronous systems. Then it discusses the perils of relying on synchrony when implementing a real system. The rest of the lecture is focused on using Paxos to implement state machine replication. It describes Paxos and explains why it works. It covers a number of issues that are fundamental in a practical implementation, for example, garbage collection, state transfer, recovery, and reconfiguration. It also describes a number of optimizations and variants of Paxos. It ends with a brief description of Google’s Chubby and Yahoo’s Zookeeper that use variants of Paxos.