You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
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)
$redis = new \RedisCluster("wwRedisCluster");
$redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE);
Below is screenshot of the redis connection behavior and cache hits of the 2 connection settings.
As you can see in
Connection config A
the current connections, cache hits and new connections for the 2 nodes are mostly the same
whist in
Connection config B
new connections are down (expected since persistent connections are enabled.)
BUT the cache hits and current connections are MOSTLY directed to 1st node while the 2nd node barely receives any activity.
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?
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 Redis::FAILOVER_DISTRIBUTE. I'll try setting up a similar local config to see if I see anything like that behavior.
@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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
Replies: 2 comments
Uh oh!
There was an error while loading. Please reload this page.
-
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
Redis::FAILOVER_DISTRIBUTE
. I'll try setting up a similar local config to see if I see anything like that behavior.Beta Was this translation helpful? Give feedback.
All reactions
Uh oh!
There was an error while loading. Please reload this page.
-
@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.
All reactions