Closed lisay-yan closed 1 month ago
This problem has bee fixed with #595 . Instead of updating the pool every time we call RedisCluster::redis
, redis-plus-plus updates the slot-node mapping every ClusterOptions::slot_map_refresh_interval
(by default, it updates every 10 seconds).
Regards
Describe the bug When I send 100 traffic to redis via AsyncRedisCluster *client client->redis(key, false).command... There are 100 "CLUSTER SLOTS", since always do pool update. AsyncRedis AsyncRedisCluster::redis(const StringView &hash_tag, bool new_connection) { _pool->update(); .... }
That is too heavy and cost CPU/mem/network. Slot change is seldom case....
To Reproduce Send traffic via AsyncRedisCluster redis command, always get equal number cluster slots command in pcap.
Expected behavior Only audit cluster slot via periodically timer.
Environment:
Additional context Add any other context about the problem here.