Redis py: when to use connection pool?

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.1', port=6379, db=0)

These two work great.

What is the idea of ​​using a connection pool? When would you use this?

+7
source share
1 answer

From redis-py docs :

redis-py Redis. Redis . , connection_pool Redis. , , .

, , , , , !

+4

Source: https://habr.com/ru/post/1628132/


All Articles