talira

A distributed, reliable key-value store for the most critical data of a distributed system

open sourceApache-2.0self-hostablefree

etcd is a strongly consistent, distributed key-value store that replicates its data with the Raft consensus protocol, so a cluster of three or five members keeps working when a minority fails. Clients read, write and watch keys for changes over gRPC, with leases (TTLs), transactions, and automatic TLS with optional client certificate authentication. It is the store behind Kubernetes' API server, and is a CNCF project written in Go under Apache-2.0. It's built for small metadata: requests are capped at 1.5 MiB by default and 8 GiB is the suggested maximum database size.

Ways to install

Problems it solves

  • a consistent place for our distributed services to store configuration that every node agrees on
  • leader election between several instances of a service so only one does the work
  • get notified the moment a configuration key changes instead of polling
  • a distributed lock that survives a node crashing
  • the backing store for a Kubernetes control plane we run ourselves
  • service discovery data that stays correct during network partitions
  • keys that expire automatically when the process holding them stops renewing
  • back up and restore the state of our Kubernetes control plane
  • compare-and-swap updates across several keys in one transaction
  • a replicated store that keeps working when one of three servers goes down
  • secure the connection between our services and the configuration store with client certificates

Features

  • Raft consensus replication
  • watch keys or prefixes for changes
  • leases with TTLs
  • multi-key transactions
  • gRPC API with an official Go client (go.etcd.io/etcd/client/v3)
  • automatic TLS with optional client certificate authentication
  • etcdctl command-line client
  • benchmarked at 10,000 writes a second
  • snapshots for backup and restore
  • pre-built binaries for Linux, macOS and Windows, and container images
View 1 more
  • robustness testing of its consistency guarantees

Limitations

  • Not for large values or big datasets: requests are capped at 1.5 MiB by default and 8 GiB is the suggested maximum size4

Capabilities

Has an APIplan not known
Has a command line toolplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what etcd does.

  1. Apache ZooKeeper The standard for distributed coordination
  2. Kine Run Kubernetes on MySQL, Postgres, sqlite, not etcd
  3. Consul Service networking automations across clouds
  4. TiKV Highly scalable, low latency, easy to use distributed transactional key-value database
  5. FoundationDB The open source, distributed, transactional key-value store

Compare etcd with the top 3