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

request timeout[QUESTION]

Open yarthur1 opened this issue 2 months ago • 3 comments

after cluster scale up,redis-plus-plus client request timeout increase;i use sw::redis::AsyncRedisCluster to get multi key,key nums no change,i want to kow why? because get key need request more nodes? sw::redis::AsyncRedisCluster request redis server is not cocurrent?

yarthur1 avatar Apr 11 '24 07:04 yarthur1

Can you show me the minimum code that can reproduce the problem? If you use MGET command, these keys should locate on the same slot, even if the cluster scales up. In that case, the client connects and read/write a single node, no matter how large the cluster is.

sewenew avatar Apr 14 '24 14:04 sewenew

I use sw::redis::AsyncRedisCluster get function to obtain each key result, key may not in same node; image

yarthur1 avatar Apr 15 '24 08:04 yarthur1

So sorry, but somehow, I missed this message.

redis-plus-plus lazily creates connections, if it's the first time that these requests are sent to nodes, it needs to create connections to them. So if you have more nodes in clusters, you get higher latency. However, if all connections have been created, there should be no difference in latency, no matter how large the cluster is.

Regards

sewenew avatar May 08 '24 14:05 sewenew