Open-Source Wikis

/

etcd

/

etcd

etcd-io/etcd

etcd

etcd is a distributed, reliable key-value store written in Go. It uses the Raft consensus algorithm to keep a strongly-consistent, replicated log across cluster members, and exposes a gRPC API (with an HTTP/JSON gateway) for clients. The repository hosts the server, the official Go client, the etcdctl and etcdutl command-line tools, the gRPC proxy, the watch cache, integration / robustness test suites, and a collection of internal tools.

What is in this wiki

  • Architecture — how the binaries fit together at runtime.
  • Getting started — clone, build, run, and exercise a local etcd cluster.
  • Glossary — etcd vocabulary you will see across the code (revision, lease, learner, MVCC, WAL...).
  • How to contribute — workflow, testing, debugging, and conventions.
  • Applicationsetcd, etcdctl, and etcdutl binaries.
  • Modules — workspace layout (api/, client/, server/, pkg/, cache/, tests/, tools/, ...).
  • Systems — internal subsystems like raft transport, MVCC, WAL, leases, auth.
  • Features — cross-cutting capabilities such as watch, transactions, snapshots, and learners.
  • API — gRPC services and protobuf surface.
  • Deployment and Security — operational and threat-model notes.
  • Monitoring — logging, metrics, and tracing.
  • Reference — configuration, data models, dependencies.

Repository at a glance

Item Value
Primary language Go
Go workspace modules 11 (./, api, cache, client/pkg, client/v3, etcdctl, etcdutl, pkg, server, tests, tools/...) — see go.work
Source files (Go) ~1,100
Lines of Go ~246,000
First commit 2013‑06‑06
Latest commit at wiki time 28af95a2d (2026‑04‑29)
License Apache 2.0 (LICENSE)
Governance CNCF graduated project (GOVERNANCE.md, OWNERS)

Where the entry points live

  • main.go — top-level wrapper that calls etcdmain.Main so go install go.etcd.io/etcd@… still works.
  • server/main.go — the actual server module entry point.
  • server/etcdmain/etcd.go — flag parsing and bootstrap logic; chooses between etcd server, gateway, and grpc-proxy modes.
  • server/embed/etcd.goembed.Etcd, the library form used by the binary and by other Go projects that embed etcd.
  • etcdctl/main.go — calls ctlv3.MustStart; the v3 client CLI.
  • etcdutl/main.go — offline data-file utility; backups, snapshots, WAL surgery.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

etcd – etcd wiki | Factory