pool = redis.ConnectionPool(host=\'10.0.0.1\', port=6379, db=0)
r = redis.Redis(connection_pool=pool)
vs.
r = redis.Redis(host=\'10.0.0
From the redis-py docs:
Behind the scenes, redis-py uses a connection pool to manage connections to a Redis server. By default, each Redis instance you create will in turn create its own connection pool. You can override this behavior and use an existing connection pool by passing an already created connection pool instance to the connection_pool argument of the Redis class. You may choose to do this in order to implement client side sharding or have finer grain control of how connections are managed.
So, normally this is not something you need to handle yourself, and if you do, then you know!