fault tolerance - Reconnection to Redis after reboot -


i've bunch long running processes connect redis server (using jedis). works fine long don't reboot machine running redis or restart redis server. reboot or restart connection lost. there standard way of dealing use case in redis/jedis or need put logic in clients myself?

redis failure/connection dropped
in case, redis either goes down or drops connection while process remains active. ensure process gets connection, use testonborrow=true in jedis connection/pool config. jedis test each connection 'ping' before using it; if redis not respond, connection discarded , try connection.

machine reboot/restart (not redis)
if application node fails or reboots, "processes" should configured restart automatically upon reboot (if that's behavior desire), or starts manually. in either case, i'd expect process create , initialize new jedis connection before real work...so else need beyond that?


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -