etcd: distributed locking and service discovery

Short Form


etcd provides easy to use distributed locking and service discovery. It has an accessible HTTP+JSON API that exposes a powerful set of primitives inspired by projects like Google's Chubby and Apache Zookeeper. This talk will cover the underlying consensus algorithm, the architecture of the code, introduce the API and survey the libraries and tools that have been built by the etcd community.


Major internet companies like Google and Yahoo have large and complex infrastructure and have talked about their use of “lock services” to help them run their operations. Google released a paper in 2006 describing their “Chubby” platform and several years later Yahoo released Zookeeper. Today, Apache Zookeeper is the primary open source lock service used by eBay, Netflix, Airbnb and many many more.

These services coordinate several important tasks, including:

- Atomically making changes like electing a new database master
- Registering and storing service information like ip, port and credentials
- Notifying clients of changes in configuration without polling
- Acting as a backing store for other service discovery mechanisms like DNS

etcd can be thought of as an alternative to Zookeeper that attempts to simplify the API and offer some easier tooling around managing the cluster. There are several features of etcd that make it attractive:

- Simplified HTTP+JSON based API
- Runtime cluster re-configuration
- Internal protocol versioning for rolling upgrades

On top of these core features etcd also exposes a number of modules that offer higher level operations:

- Fair distributed lock and leader election
- Built in dashboard for introspection

This talk will start by discussing use cases for these sorts of systems in server infrastructure. Then dive into the Raft consensus algorithm that makes etcd tick. With a basic understanding of the system we will walk through the API and cluster management. And we will end with a survey of the tools and libraries that are available to build etcd into your systems.

etcd can be found here:


etcd, consensus, raft

Speaking experience

I speak regularly at conferences and meetups. Here are a couple of recent talk videos:


  • Brandon Philips

    CoreOS, Inc


    Brandon Philips is helping to build modern Linux server infrastructure at CoreOS. Because of this, he was recently disowned by one of his Linux kernel friends for being “one of those weirdos on the other side of the syscalls”.