gitmyhub

codis

Go ★ 13k updated 2y ago

Proxy based Redis cluster solution supporting pipeline and scaling dynamically

Codis is a proxy that makes multiple Redis servers appear as one, letting you scale Redis beyond a single machine without changing your application code or client libraries.

GoRedisZooKeeperetcdsetup: hardcomplexity 4/5

Codis is a tool for running Redis at a larger scale than a single server can handle. Redis is a popular in-memory data store that many applications use for caching and fast data access, but it runs on one machine by default. Codis sits in front of multiple Redis servers and acts as a proxy, making them appear as one unified system to any application that connects to it. Written in Go, it was built to handle production workloads and has been used at scale by at least one major Chinese technology company.

The main problem Codis addresses is what happens when you need more capacity than one Redis server provides. It lets you add or remove servers from the cluster without restarting anything, which is a meaningful operational advantage. It also supports pipelining, a technique where multiple commands are sent together rather than one at a time, which can significantly speed up certain workloads. Because it works as a standard proxy, any existing Redis client library can connect to it without modification.

The project includes a web-based dashboard for managing and monitoring the cluster, along with admin tools. You can watch the state of proxy nodes, data slots, server groups, and any monitoring agents running alongside Redis through a graphical interface rather than command-line tools alone.

High availability is handled through integration with coordination services like ZooKeeper or etcd, allowing client-side tools to automatically route around any proxy that goes offline. Benchmark results are documented separately in the project repository.

The README is concise and links out to fuller tutorials in both Chinese and English, though the English documentation was still marked as a work in progress at the time the README was written.

Where it fits