Description
Issue
Basically, if you run redis behind AWS-NLB or Azure-Loadbalancer there's an idle timeout configured by LoadBalancer like 350 seconds for AWS and 4 minutes for azure. Despite the keepalive you set on the machine hosting redis, the connection from the node app will be dropped if it's idle for more than the above time.
Is it possible to enable a parameter like setPingConnectionInterval
which basically sends a PING request to redis to keep the connection alive and prevent it from dropping?
This could be same as the setPingConnectionInterval used in Redisson client
or setTestOnBorrow in jedis
.
If there's existing functionality that takes care of it, please help out in pointing the same. Say- socket_initial_delay
which states this will also behave the interval keep-alive message sending to Redis.
From what I understand it will keep on sending the messages to keep the connection alive other than the initial delay. Correct me if i am wrong here.
Environment
- Node.js Version:
9.1.0
- Redis Version:
5.0.6
- Platform:
Ubuntu-18.04