redis-plus-plus icon indicating copy to clipboard operation
redis-plus-plus copied to clipboard

[BUG] AsyncRedisCluster redis(key) always do pool->update

Open lisay-yan opened this issue 2 weeks ago • 0 comments

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:

  • OS: [e.g. ubuntu]
  • Compiler: [e.g. gcc 7.3.1, clang 3.9.1]
  • hiredis version: [e.g. v1.0.0, master]
  • redis-plus-plus version: [e.g. 1.3.2, master, commit b0a42e]

Additional context Add any other context about the problem here.

lisay-yan avatar Jun 18 '24 08:06 lisay-yan