A lightweight, Redis-compatible in-memory key-value store built from scratch in Go. Integrates the RESP (Redis Serialization Protocol) for wire-level compatibility with standard Redis clients.
- RESP protocol — speaks the same wire format as Redis, so existing Redis clients can connect out of the box
- Concurrent TCP server — handles multiple client connections using Go channels for connection lifecycle and command dispatch
- Thread-safe storage —
sync.RWMutex-backed key-value store for safe concurrent reads and writes
| Command | Syntax | Description |
|---|---|---|
SET |
SET key value |
Store a key-value pair |
GET |
GET key |
Retrieve the value for a key |
HELLO |
HELLO value |
Handshake/ping |
CLIENT |
CLIENT value |
Client handshake/identification |
- Go 1.24+
- redis-cli(includeed in redis)
make build # compiles to ./bin/goredis
make run # builds and starts the server on :5001redis-cli -p 5001 SET hello world