finds.dev← search

// the find

HDT3213/godis

★ 3,838 · Go · GPL-3.0 · updated Sep 2025

A Golang implemented Redis Server and Cluster. Go 语言实现的 Redis 服务器和分布式集群

Godis is a Redis-compatible server written in Go, with a full cluster mode backed by Raft for metadata management. It's primarily a learning project — the author says so explicitly — but it's grown into something with real test coverage, AOF/RDB persistence, replication, and ~150k ops/sec on commodity hardware. Good for understanding how Redis works internally; not a production Redis replacement.

The concurrent dict implementation (datastruct/dict/concurrent.go) shards the keyspace across multiple hash maps with fine-grained locking instead of a single global lock — that's the right approach and explains the benchmark numbers. The cluster layer uses TCC (try-commit-catch) for cross-slot atomicity on MSET/DEL/RENAME, which is more than most educational Redis clones bother with. Test coverage is solid across the data structures, AOF, replication, and cluster commands — not just happy-path smoke tests. The code is well-organized for reading: the directory layout maps cleanly to Redis's own conceptual layers, so you can follow the call path from TCP connection to command handler without getting lost.

GPL license is a non-starter if you want to embed or build on this commercially — real Redis uses BSD. The benchmark is single-node on an M2 with no persistence enabled, so the numbers look better than they would under production conditions (AOF fsync, network round-trips, concurrent writers on real hardware). There's no ACL system, no TLS, and no Streams support — gaps that matter if you're evaluating it as a drop-in for anything beyond basic key-value use. Replication is documented but the README gives it one bullet point with no explanation of replication lag behavior, failover timing, or what happens during a split-brain scenario in cluster mode.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →