$ account etcd-io
etcd is a distributed, strongly consistent key-value store that serves as a foundational building block for distributed systems, particularly Kubernetes. In production, it runs as a Raft-based cluster (typically 3-5 nodes) providing gRPC and HTTP APIs for reading, writing, watching, and leasing key-value data. The server persists state via an MVCC engine over bbolt, with a write-ahead log (WAL) and snapshotting for durability and recovery. Key client libraries exist in Go (client/v3), along with CLI tools (etcdctl, etcdutl) and embedded server support. The architecture separates consensus (Raft), storage (MVCC/WAL/backend), API (gRPC/HTTP), and client layers, with extensive observability (Prometheus metrics, OpenTelemetry tracing). External dependencies include bbolt, the etcd-io/raft library, gRPC, protobuf, and Prometheus. While primarily an application/infrastructure project, it also includes research-grade robustness testing with model checking and fault injection, but these are testing tools, not the core purpose.
bbolt is a production-grade, embedded key-value store for Go, forked from Bolt and inspired by LMDB. It provides ACID transactions, memory-mapped zero-copy reads, and a B+tree data model with buckets and cursors. The core library is used as the storage engine for etcd, InfluxDB, Consul, and other high-throughput systems. The repository also includes a full-featured CLI tool (`bbolt`) for database inspection, integrity checking, benchmarking, and surgical repair (e.g., page copying, freelist reconstruction). The architecture is a pure-Go library with minimal dependencies, relying on platform-specific syscalls for mmap, flock, and mlock. The codebase demonstrates strong engineering practices: clean abstractions (swappable freelist implementations via an interface), extensive test coverage including fault injection and robustness tests against filesystem failures, and a well-organized CLI command structure using Cobra. While primarily a library, the CLI makes it also a standalone application for database administration.