We're excited to release version 0.3.0 of etcd, a highly-available key value store for shared configuration and service discovery. Read on to learn about the changes in this release or hop over to GitHub to download the latest binaries.
The Discovery API automates the process of bootstrapping a cluster. In previous releases, a human had to pick a leader, pass a list of
-peers to all of the followers and maintain that list going forward. The Discovery API takes a unique token as an input and fetches a list of peers that have already been registered with that token. If no peers have ever existed, the first peer to use that token will assume leadership of the cluster. Stale peers will be cleaned up automatically to allow you to use the same token as machines come and go.
This release does not break the existing v2 API but it does add two new features:
CompareAndDelete: etcd has let you create and update keys atomically but this release introduces atomic deletes too. This means that you can delete a key only if certain prerequisites like its index or value are correct.
prevNode: write requests will now return a prevNode field next to the existing node field. This entry represents the state of this key before the write was made and is useful for many uses like using a key as a simple atomic queue without a GET and PUT.
We added an event-based logging system to get details about leader elections and cluster changes out of the core consensus system of etcd. This gives admins more clear and helpful information about the cluster state via log files.
We recently moved to using
goven for dependency management in etcd which means a few things:
go get github.com/coreos/etcdworks and is a fast way to grab master
info file was removed and is no longer used. This file was a cache of
command line arguments and was causing a lot of confusion and bug reports. If
you have an info file in your etcd data directory you can safely remove it.
etcd uses a replicated log that is managed by the Raft consensus protocol. During normal usage, every write causes an entry to be appended to the log. In previous releases, the entire log was stored in memory, which caused memory usage to grow over the life of the cluster.
In this release we enabled
-snapshot=true by default. This means that
periodically etcd will flush older logs from memory to reduce resource usage.