Allow to specify TCP idle timeouts and enable TCP resets in internal load balancer of Redis Cache
We use Jedis to connect with our Redis Cache. It has a known issue, which causes it to block indefinitely if a TCP connection fails during some operations. It happens due to infinite socket timeout specified for these operations. Link: https://github.com/xetorthio/jedis/issues/426
We bumped into this issue recently during Redis Cache failover, when we experienced a significant number of socket timeouts. It looked like connections were not closed properly.
One of the failed connections happened to be used for complex operation mentioned in above GitHub issue. As a result, our Jedis thread was blocked for 15 minutes before idle connection was finally closed.
As Redis Cache uses a load balancer internally, we suspect that specifying TCP idle timeouts and enabling TCP resets for it may solve this issue. Any idle connections would then be closed by the load balancer after specified timeout.
This issue could happen to Lettuce.