etcd-io/etcd
By the numbers
Data collected on 2026-04-30 against commit 28af95a2d.
Size
| Language | Lines |
|---|---|
Go (*.go) |
246,054 |
Markdown (*.md) |
12,799 |
Shell (*.sh) |
4,615 |
YAML (*.yaml, *.yml) |
1,696 |
Protobuf (*.proto) |
1,936 |
xychart-beta horizontal
title "Source lines by language"
x-axis ["Go", "Markdown", "Shell", "Protobuf", "YAML"]
y-axis "Lines" 0 --> 250000
bar [246054, 12799, 4615, 1936, 1696]The Go count includes generated protobuf stubs (the four largest Go files in the repo are protobuf output, see "Complexity hotspots" below).
Module breakdown (Go workspace)
| Module path | *.go files |
Go lines |
|---|---|---|
server/ |
390 | 85,523 |
tests/ |
263 | 64,921 |
api/ |
20 | 38,057 |
client/ (pkg + v3) |
189 | 23,021 |
pkg/ |
87 | 11,057 |
etcdctl/ |
50 | 8,048 |
tools/ |
56 | 6,520 |
cache/ |
18 | 4,764 |
etcdutl/ |
21 | 2,507 |
contrib/ |
11 | 1,612 |
| Total | ~1,105 | ~246,000 |
api/ is small in file count but large in lines because it contains generated *.pb.go files for the public protobuf surface; see reference/data-models.md.
History at a glance
- First commit:
20ca21a3fon 2013-06-06 —store module and unit test for store. - Latest commit at wiki time:
28af95a2don 2026-04-29 — fix toetcdutlhash timeout (PR #21686). - Total commits on
main: 24,682. - Tagged releases include 3.0 → 3.6 series for the etcd module, plus parallel tag namespaces for
api,server,client,client/pkg,pkg,etcdctl,etcdutl, andtests(seegit tagoutput).
Major release timeline
| Release | First tag date |
|---|---|
| v3.0.0 | 2016-06-30 |
| v3.1.0 | 2017-01-20 |
| v3.2.0 | 2017-06-09 |
| v3.3.0 | 2018-02-01 |
| v3.4.0 | 2019-08-30 |
| v3.5.0 | 2021-06-15 |
| v3.6.0 | 2025-05-15 |
The 3.5 → 3.6 gap (almost four years) is the longest in the project's history; 3.6 was finally cut shortly before this wiki was generated.
Activity
Commits per month over the last ~2 years on main (excerpt):
| Month | Commits |
|---|---|
| 2024-09 | 85 |
| 2024-10 | 161 |
| 2024-11 | 143 |
| 2024-12 | 128 |
| 2025-01 | 202 |
| 2025-02 | 180 |
| 2025-03 | 154 |
| 2025-04 | 121 |
| 2025-05 | 267 |
| 2025-06 | 144 |
| 2025-07 | 183 |
| 2025-08 | 166 |
| 2025-09 | 171 |
| 2025-10 | 145 |
| 2025-11 | 96 |
| 2025-12 | 70 |
| 2026-01 | 136 |
| 2026-02 | 140 |
| 2026-03 | 111 |
| 2026-04 | 112 |
The May 2025 spike aligns with the 3.6.0 release.
Bot-attributed commits
Bot co-authorship via Co-authored-by: trailers in the last 12 months: 0 counted commits. This does not mean no AI assistance was used — inline AI tools leave no trace in git log — only that the project does not currently use bots that sign their commits as co-authors. The recurring dependabot[bot] author you see in shortlogs commits as the dependabot user directly rather than as a co-author. Over the last 12 months, dependabot accounts for roughly 1.1% of authored commits.
Complexity (largest source files)
| Lines | File |
|---|---|
| 24,822 | api/etcdserverpb/rpc.pb.go (generated) |
| 3,270 | api/etcdserverpb/gw/rpc.pb.gw.go (generated) |
| 2,948 | api/etcdserverpb/raft_internal.pb.go (generated) |
| 2,476 | server/etcdserver/server.go |
| 2,265 | server/etcdserver/api/v3election/v3electionpb/v3election.pb.go (generated) |
| 2,215 | tests/integration/v3_grpc_test.go |
| 2,150 | tests/robustness/validate/validate_test.go |
| 2,137 | api/etcdserverpb/rpc_grpc.pb.go (generated) |
| 1,802 | tests/integration/clientv3/lease/leasing_test.go |
| 1,715 | tests/integration/cache_test.go |
| 1,703 | tests/framework/integration/cluster.go |
| 1,585 | tests/integration/clientv3/watch/v3_watch_test.go |
| 1,576 | server/etcdserver/server_test.go |
| 1,541 | api/membershippb/membership.pb.go (generated) |
| 1,402 | server/embed/config.go |
The two non-generated outliers — server/etcdserver/server.go (2,476 lines) and server/embed/config.go (1,402 lines) — are the long-standing focal points of the project; both have been refactored repeatedly but remain the single source of truth for EtcdServer and the Config API.
TODOs and FIXMEs
grep -rE "TODO|FIXME|HACK" --include="*.go" finds 441 occurrences across 196 files. See cleanup-opportunities/todos-and-fixmes.md for a sampling.
Test-to-code ratio
tests/ alone contributes ~65k lines, on top of the _test.go files that ship next to each package. Combined with the tests/robustness/ linearizability harness (Jepsen-style), correctness tests are roughly the same order of magnitude as production code — a deliberate design choice for a system in etcd's role.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.