Search code examples
pythonredisredis-py

Does the redis-py module work with Redis in Cluster mode?


I'm trying to use redis-py with redis in cluster mode, but I can't get it to work. I see that redis-py-cluster works, but I have a preference for redis-py as I have been using it and it's a recommended client.


Solution

  • redis-py does not support cluster mode. Clustering has totally different architecture to serve the purpose of horizontal scalability. HA (High Availability) was not a priority in its design. Therefore you can not use one client for the other.

    redis-py-cluster seem to have ongoing development / support, and it's based on redis.py. The client page you linked was not for redis cluster. "redis-py-cluster" is mentioned on redis cluster page (look for "Playing with the cluster"): https://redis.io/topics/cluster-tutorial

    Asides from clustering, Redis has sentinel supported setup to provide HA, which redis-py does support.