sewenew / redis-plus-plus

Redis client written in C++
Apache License 2.0
1.6k stars 347 forks source link

request timeout[QUESTION] #558

Closed yarthur1 closed 3 months ago

yarthur1 commented 5 months ago

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?

sewenew commented 5 months ago

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.

yarthur1 commented 5 months ago

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

sewenew commented 4 months ago

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 commented 3 months ago

Since there's no update, I'll close this issue.

Regards