Redis Failure/Connection Dropped
In this case, redis either goes down or drops the connection while your process remains active. To ensure the process gets a good connection, use testOnBorrow=true
in jedis connection/pool config. Jedis will test each connection with 'PING' before using it; if redis does not respond, the connection is discarded and it will try another connection.
Machine Reboot/Restart (not redis)
If the application node fails or reboots, your "processes" should be configured to restart automatically upon reboot (if that's the behavior you desire), or someone starts it manually. In either case, I'd expect your process to create and initialize a new jedis connection before it does any real work...so what else do you need beyond that?