LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Redundant servers (https://www.linuxquestions.org/questions/linux-general-1/redundant-servers-431385/)

dranobob 04-03-2006 12:35 PM

Redundant servers
 
Okay not sure how to proceed on this one. I currently host 2 websites off the server at my house. One is an online store i host for a friend. I would like to be able to build another fedora box to act as a backup. Both would be behind my linksys router which passes port 80 requests to the first one already. Is there a solution that if the main server went down that the backup server would automatically start handling the port 80 requests.

I have some thoughts of writing a php script on the backup server that would check some text off a home page on the other server. If say after 3 checks it couldn't recieve the page, it would issue the shell command to start it's httpd service and try to issue the same command to the main server to shut its down. This way just in case the backup server was wrong, both will not be operating as the web server. then the script would issue an email or text message to me to let me know the switch happened. The only unknown is can you have a linksys router send port 80 requests to more than one box. (I will check this tonight).

I would love the challenge, but if there is already a open source software or another method to make this happen...I would love the time savings.

acid_kewpie 04-03-2006 12:53 PM

check out all the solutions you need at linux-ha.org a simple heartbeat with an implementation of hsrp is fairly simple to achieve.

dranobob 04-03-2006 01:57 PM

I'll give it a try. Just so I'm clear, I checked their site and it appears that it creates a cluster. In a simple passive/active case, the heartbeat software monitors the services I choose to, in this case apache, and in the event it is unhappy with the results of the test, it shuts down apache, and then releases the ip on the first server and gives it to the backup serverso the router never notices a difference and then starts the backups apache. So I presume originally you set the backup server another IP and if the switch occurs, the IP will be changed and the first presumed dead.

Also can you have it run additional scripts when it does the switch, say an email script to let me know the switch occured

acid_kewpie 04-03-2006 02:59 PM

well that site contains information about a large range of different HA techniques and implementations, but essentially you just want a failover IP address.


All times are GMT -5. The time now is 10:42 PM.