etcd

active

by etcd maintainers / CNCF · since 2013

Raft-based, strongly consistent key-value store that holds Kubernetes' cluster state.

key-valuedatabase engineopen source (permissive)mature

Overview

etcd is a small, strongly consistent key-value store designed for the most critical data in a distributed system: configuration, service discovery, leader election and locks. It replicates via Raft, keeps a multi-version history so clients can watch for changes from any revision, and attaches leases to keys for TTL-based expiry. Every Kubernetes control plane depends on it, which makes it one of the most widely deployed databases in the world even if few people query it directly. Keep datasets small (the default quota is 2 GB, recommended maximum about 8 GB); it is a coordination service, not a general-purpose database.

Strengths & trade-offs

Strengths

  • +Linearizable reads and writes through Raft consensus
  • +Watch API streams changes from any historical revision
  • +Leases, locks and leader election primitives built in
  • +Battle-tested as the backing store of every Kubernetes cluster
  • +Simple single binary with TLS and RBAC

Trade-offs

  • −Full dataset on every member, with a recommended ceiling of about 8 GB
  • −Write throughput bounded by a single Raft leader and disk fsync latency
  • −Needs periodic compaction and defragmentation
  • −Not meant for application data or large values

Great for

  • +Kubernetes and control-plane state
  • +Service discovery and dynamic configuration
  • +Distributed locks and leader election
  • +Feature flags and small metadata for infrastructure

Think twice for

  • −Application databases
  • −Large datasets or blobs
  • −High-volume write workloads

Capabilities

Native or official first-party support · 6 of 25 tracked

✓Transactions
✓TTL / expiry
✓Pub/Sub
✓Durable persistence
✓Role-based access
✓Time travel
–Joins
–Secondary indexes
–Full-text search
–Vector search
–Geospatial
–JSON
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–Columnar storage
–In-memory
–Compression
–Encryption at rest
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
Full ACID
Consistency
Strong
Schema
Schemaless
Architecture
Distributed, Client server
Query languages
etcd v3 API

Every member stores the full dataset; clusters of 3 or 5 members are typical. Designed for gigabytes, not terabytes.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsgRPC, gRPC-gateway (HTTP/JSON)
client languagesGo, Java, Python, JavaScript, Rust, C++

Alternatives to etcd

Compare all→
Apache ZooKeeperHierarchical39.9

The original coordination service: hierarchical znodes, watches and ephemeral nodes for clusters.

etcd vs apache-zookeeper →
Consul KVKey-Value39.0

The key-value store built into HashiCorp Consul for service config, locks and discovery.

etcd vs hashicorp-consul-kv →
FoundationDBKey-Value36.8

Apple's ordered, strictly serializable distributed key-value store, built to have layers on top.

etcd vs foundationdb →
TiKVKey-Value20.8

CNCF-graduated, Raft-replicated transactional key-value store in Rust; the storage layer of TiDB.

etcd vs tikv →
bboltKey-Value11.5

etcd's maintained fork of BoltDB: a simple, pure-Go B+tree store in a single file.

etcd vs bbolt →
cdbKey-Value3.5

D. J. Bernstein's constant database: immutable on-disk hash tables with two-read lookups and atomic swaps.

etcd vs cdb →

etcd FAQ

What is etcd?

etcd is a key-value database by etcd maintainers / CNCF, first released in 2013. etcd is a small, strongly consistent key-value store designed for the most critical data in a distributed system: configuration, service discovery, leader election and locks. It replicates via Raft, keeps a multi-version history so clients can watch for changes from any revision, and attaches leases to keys for TTL-based expiry. Every Kubernetes control plane depends on it, which makes it one of the most widely deployed databases in the world even if few people query it directly. Keep datasets small (the default quota is 2 GB, recommended maximum about 8 GB); it is a coordination service, not a general-purpose database.

Is etcd open source?

Yes. etcd is open source. License: Apache License 2.0.

Does etcd support ACID transactions?

Yes. etcd supports full ACID transactions, with strong consistency.

Does etcd scale horizontally?

etcd does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

How can I run etcd?

You can self-host it.

What is etcd best for?

etcd is a strong fit for kubernetes and control-plane state; service discovery and dynamic configuration; and distributed locks and leader election. Think twice for application databases.

What are the best alternatives to etcd?

Common alternatives to etcd include Apache ZooKeeper, Consul KV, FoundationDB, TiKV and bbolt. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is etcd?

etcd ranks #71 of 844 databases on the WhichDB Score (32.4/100), and #12 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.