A Redis-compatible server built from scratch in Go
This project is a Redis server implementation in Go, built step-by-step following the Codecrafters Redis Challenge. It supports basic Redis commands, RDB persistence, and replication.
✔ Bind to a port and accept connections
✔ Handle multiple concurrent clients
✔ Implement the following Redis commands:
PINGECHOSET&GET
✔ Parse and load RDB files
✔ Support for:
- Reading a key and its value
- Handling multiple keys and values
- Expiry handling for keys
✔ Configure the server to act as a replica
✔ Implemented the INFO command for replication status
✔ Initial replication setup:
- Send handshake (3/3)
- Receive handshake (1/2) (in progress)
🔹 Finish Replication:
- Complete Receive handshake (2/2)
- Full master-replica synchronization
🔹 Support Redis Streams
🔹 Implement Redis Transactions (MULTI, EXEC, DISCARD)
- Go 1.20+ installed
go run app/main.goredis-cli -p 6379127.0.0.1:6379> PING
PONG
127.0.0.1:6379> SET key1 "hello"
OK
127.0.0.1:6379> GET key1
"hello"Contributions are welcome! Feel free to open issues and PRs.