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

Sachin Vyas
  • 41
  • 1
  • 5
  • check this https://stackoverflow.com/questions/8984870/creating-and-managing-multiple-connections-in-redis-python – Malik Faiq Sep 24 '19 at 11:11

1 Answers1

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)
Fabio Manzano
  • 2,847
  • 1
  • 11
  • 23