Redis Cluster - More clients connected on first node than on the others #1951
-
Hi all, I'm using a Redis cluster with 6 nodes (3 primary and 3 secondaries). This Redis is only used as a stream and I have 12 streams on it (4 in each node). The code was implemented to add messages in the streams uniformly, so the number of commands XADD is similar to each primary node. But the number of clients and each node is different, with more clients connected on the first node. May someone help me to understand what could be happening? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Underneath, It is hard to tell more, but perhaps the first node receives more commands. That can happen if some keys are more popular than the others. |
Beta Was this translation helpful? Give feedback.
Underneath,
redis.ClusterClient
usesredis.Client
to comminucate with each node in a cluster. Eachredis.Client
maintains a separate pool of connections. Number of connections in the pool depends on number of commands that must be processed.It is hard to tell more, but perhaps the first node receives more commands. That can happen if some keys are more popular than the others.