I am looking for simple fail-over solution. If the 92 server is down, the application should point to 91 server. I can check the connectivity by scripting the following commands.
[root@sserver shantanu]# nc -z 10.10.10.92 6379 > /dev/null;
[root@server shantanu]# echo $?
1
[root@server shantanu]# nc -z 10.10.10.91 6379 > /dev/null;
[root@server shantanu]# echo $?
0
I wanted to know if there is a better way to do this. Can I host my script on 92 server and check if 6379 local port is working. If it is down, forward the request to 6379 port of 91.
I am looking for simple solution that anyone can understand and manage. If there is no such option available, please suggest the softwares for the same purpose.