Replies: 2 comments
-
Sorry I missed this question when it was first posted. Off the top of my head, i'm not sure why there would be such a concentration of requests to one node when you're setting |
Beta Was this translation helpful? Give feedback.
-
@michael-grunder I have a somewhat related issue. I'm also working with Elasticache Redis, and I've encountered a lot of "broken pipe" errors, that occurs when some master nodes reach the limit of 65K connections. I initialized the RedisCluster class with persistence flag set to true, timeout and readTimeout set to 0.25 (I didn't change any redis.ini settings). I noticed that the master nodes get most of the traffic while replica nodes get almost none, so I set the OPT_SLAVE_FAILOVER - FAILOVER_DISTRIBUTE option, as in the question above. I was expecting to see less connections to the master nodes, and more connections to the replica nodes. To my surprise, the number of connections to the replica nodes increased, but at the same time the number of connections to the master nodes did not decrease, in fact, it looks like it may have even made things a little worse. I'm using the latest version of phpredis. Is there anything I can do to solve it? Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I working on a PHP project that uses phpredis to connect to AWS Elasticache using the configuration endpoint (single URL) provided by the cluster.
Here are the cluster details
I did 2 types of settings to connect to the cluster:
For the first setting I am using php redis version 3.1.6 and I am establishing a connection using the following method (Connection Config A)
Then for the second setting I am using php redis 4.3.0, updated the redis.ini and establishing a connection using the following method (Connection config B)
Below is screenshot of the redis connection behavior and cache hits of the 2 connection settings.
As you can see in
Connection config A
whist in
Connection config B
I am lost why connection config B mostly directs the connections on node 1. I was under the assumption that the connections to both nodes needs to be equal like what happened to connection config A
Can you please provide some insight how to make the connections distribute to both nodes using connection pooling, persistent connection and pconnect.limit?
Beta Was this translation helpful? Give feedback.
All reactions