4

Does Redis Cluster support connection pooling using python api "rediscluster"? I have searched but could not find an appropriate link. Can someone share the code or the link if connection pooling is supported in the python api?

Thank You, Sachin Vyas

1

1 Answer 1

0

If you check rediscluster's page on PyPI, you'll find this note:

rediscluster-py is based on the awesome redis-py StrictRedis Api, thus the original api commands would work without problems within the context of a cluster of redis servers

So you can rely on redis-py's API for connection pooling:

pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
r = redis.Redis(connection_pool=pool)
Sign up to request clarification or add additional context in comments.

2 Comments

You can but redis-py does not calculate cluster slots so it's not usable
check this link this would solve your problem stackoverflow.com/questions/8984870/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.