etcd v3 compatible
The standalone binary speaks the etcd v3 gRPC protocol. Drop in for most cases as an etcd replacement — etcdctl, the Go client, and any etcd v3 library work unchanged. See the compatibility guide for the supported subset.
# Installgo install github.com/t4db/t4/cmd/t4@latest
# Start — S3-durable, etcd-compatiblet4 run \ --data-dir /var/lib/t4 \ --listen 0.0.0.0:3379 \ --s3-bucket my-bucket \ --s3-prefix t4/
# Use any etcd v3 clientetcdctl --endpoints=localhost:3379 put /config/timeout 30setcdctl --endpoints=localhost:3379 get /config/timeoutimport "github.com/t4db/t4"
node, err := t4.Open(t4.Config{ DataDir: "/var/lib/myapp/t4", ObjectStore: s3Store, // nil for local-only})defer node.Close()
rev, _ := node.Put(ctx, "/config/timeout", []byte("30s"), 0)kv, _ := node.Get("/config/timeout")etcd v3 compatible
The standalone binary speaks the etcd v3 gRPC protocol. Drop in for most cases as an etcd replacement — etcdctl, the Go client, and any etcd v3 library work unchanged. See the compatibility guide for the supported subset.
S3-durable
WAL segments and checkpoints are uploaded to S3. A node that loses its disk recovers automatically on next boot — no manual intervention.
Multi-node clustering
Leader election via S3 atomic locks — no Raft, no ZooKeeper, no cluster membership config. Any node can join or leave at any time.
Embeddable Go library
One t4.Open(cfg) call. No sidecar process, no daemon. Run the store inside your binary for zero-overhead local reads.
Zero-copy branching
Fork a database at any checkpoint without copying S3 objects. Shared SSTs are content-addressed and deduplicated automatically.
Prometheus metrics
Built-in /metrics, /healthz, and /readyz endpoints. Drop into your existing observability stack.
go install github.com/t4db/t4/cmd/t4@latestOr pull the Docker image:
docker pull ghcr.io/t4db/t4:latestgo get github.com/t4db/t4Requires Go 1.22+.
| T4 | etcd | |
|---|---|---|
| etcd v3 KV + Watch API¹ | ✅ | ✅ |
| S3-backed disaster recovery | ✅ | ❌ |
| Survive total disk loss | ✅ | ❌ |
| Embeddable Go library | ✅ | ❌ |
| Zero-copy branching | ✅ | ❌ |
| Consensus protocol | S3 atomic locks | Raft |
| Write throughput (8+ concurrent writers) | faster | slower |
| Write throughput (1–4 concurrent writers) | slower | faster |
| Read throughput | equivalent | equivalent |
¹ T4 implements the KV, Watch, Lease, and Auth services. Status and Defragment return sensible responses. Alarm, Snapshot, Hash, and cluster membership mutations (MemberAdd/Remove) are not supported. See the compatibility guide for details.