RedisLabs/redis-cluster-proxy
FreeA proxy for Redis clusters.
FreeFree tier
About RedisLabs/redis-cluster-proxy
Redis Cluster Proxy is a multi-threaded proxy for Redis clusters that abstracts the cluster's internal topology, allowing clients to interact with a set of Redis instances as if they were a single instance. It supports routing queries to the correct node, automatic handling of cluster configuration changes (ASK/MOVED errors), and cross-slot/cross-node operations for commands like MGET, MSET, and DEL. The proxy uses a multiplexing communication model by default, with fallback to private connections for transactions and blocking commands. It is written in C and intended for evaluation and contribution; the project is in alpha stage and not recommended for production use.
Key Features
Automatic query routing to the correct cluster node
Multi-threaded architecture for concurrent client handling
Multiplexing communication model (shared connections per thread) with fallback to private connections for transactions and blocking commands
Guaranteed query execution and reply order even in multiplexing mode
Automatic cluster configuration update after ASK/MOVED errors, with re‑execution of affected queries transparent to the client
Cross-slot and cross-node query support (e.g., MGET, MSET, DEL) with command‑specific reply merging (optional, disabled by default)
Support for commands that span all nodes (e.g., DBSIZE) with map‑reduce result aggregation
PROXY command for proxy‑specific actions
Runs on most POSIX systems (Linux, macOS, NetBSD)
Pros & Cons
Pros
- Abstracts cluster complexity, allowing use of simple Redis clients with a cluster
- Multi‑threaded design improves throughput under concurrent load
- Automatic recovery from MOVED/ASK errors with transparent query retry
- Supports cross‑slot commands that would otherwise require client‑side aggregation
- Reduces connection count via multiplexing for common commands (GET, SET, etc.)
Cons
- Project is in alpha stage and not actively maintained; production use is discouraged by the authors
- Cross‑slot queries break atomicity and are disabled by default
- Limited documentation and community support outside the GitHub repository
- May introduce additional latency compared to direct cluster client usage
- Has not been tested or hardened for production workloads
Best For
Simplifying Redis Cluster interaction for clients that do not support the cluster protocolEnabling standard Redis clients to operate on a cluster as if it were a single instancePerforming multi‑key operations across slots or nodes without client‑side logicAbstracting cluster topology changes (e.g., failover, resharding) from application codeEvaluating or experimenting with Redis Cluster proxying in non‑production environments
FAQ
What is Redis Cluster Proxy?
It is a proxy for Redis clusters that allows clients to talk to the cluster as if it were a single instance, abstracting the partitioning and failover logic.
How does the proxy handle MOVED and ASK errors?
When MOVED or ASK errors occur, the proxy automatically updates its internal cluster configuration by fetching an updated topology and remapping all slots. Queries are re‑executed after the update, so the client never sees the error and receives the expected reply.
Is Redis Cluster Proxy production‑ready?
No. The project is labeled as alpha code, is not actively maintained, and the authors discourage its use in any production environment.
What cross‑slot commands are supported?
Commands involving multiple keys across different slots or nodes (e.g., MGET, MSET, DEL) are supported, but they break atomicity and are optional (disabled by default).
What communication models does the proxy use?
By default it uses a multiplexing model where each thread shares a single connection to the cluster. For MULTI transactions or blocking commands, the proxy switches to a private connection model per client.