LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Any fail over solution ideas? (https://www.linuxquestions.org/questions/linux-server-73/any-fail-over-solution-ideas-675494/)

diilbert 10-10-2008 09:05 AM

Any fail over solution ideas?
 
I am running 2 Debian web servers. One is a mirror of the other. What I am looking for is a seamless fail over solution. I have read a lot about KeepAliveD (http://www.keepalived.org/), but from what I can tell it can only be implemented in a LVS (http://www.linux-vs.org/) setup, which is a kind of over kill for what we are doing. We only have 2 servers and do not necessarily need to load balance.

I am probably missing something.

Any direction would be appreciated.

Thanks!

DotHQ 10-10-2008 10:31 AM

Are you running a DB on the servers?
If it is a database driven web site you will have to have an external db server or a external disk array with both apache servers having access to the db on the array's.
The problem being if one server fails mid transaction how do you know if the db on the other server has been updated? Even with a mirror there is delay. I've found no cheap way to accomplish this. But ....I'll admit it has been awhile since I looked into this (a year or so).

TB0ne 10-10-2008 10:51 AM

Quote:

Originally Posted by DotHQ (Post 3306204)
Are you running a DB on the servers?
If it is a database driven web site you will have to have an external db server or a external disk array with both apache servers having access to the db on the array's.
The problem being if one server fails mid transaction how do you know if the db on the other server has been updated? Even with a mirror there is delay. I've found no cheap way to accomplish this. But ....I'll admit it has been awhile since I looked into this (a year or so).

No, there really is no cheap way to do this effectively. You get what you pay for in this case.

You can come close with some manual juggling, like having a mirrored disk set, and periodically 'breaking' the mirror, removing the drive, and putting a blank/old one in to remirror to, and putting the one you just removed in a different location. But this is risky, involves downtime, and is VERY manual. Snapshots with systemimager or mondoarchive will let you recovery quickly, but your server will still be down while you do it.

The only 'real' way to do it is to have a duplicate server, either in a cluster or pre-configured in a 'hot-standby' mode, so that if one fails, the other takes over. Database driven? MySQL replication or Oracle RAC. If you want 24/7/365 with no downtime, you're going to have to have a fat wallet, the willingness to spend it, and some skills to configure it all.

diilbert 10-10-2008 11:33 AM

I am running MySQL on both servers, 1 slave and 1 master replicating. Of course "some" data loss is acceptable.

Is there anyway for a backup server to know that the master is "out of commission" and assume the masters role, taking over the public IP address and start serving content.

I guess I wondering if there is a project out there that accomplishes this.

rhelaine 10-10-2008 03:50 PM

DRBD would do the trick. would be a very small cluster sure but the software has a good doc and it does what you want.

DRBD.org

TB0ne 10-10-2008 05:11 PM

Quote:

Originally Posted by diilbert (Post 3306253)
I am running MySQL on both servers, 1 slave and 1 master replicating. Of course "some" data loss is acceptable.

Is there anyway for a backup server to know that the master is "out of commission" and assume the masters role, taking over the public IP address and start serving content.

I guess I wondering if there is a project out there that accomplishes this.

Check out MySQL cluster

http://dev.mysql.com/doc/refman/5.1/...-failover.html

I don't know if you can do it automatically, but there IS a procedure you can run to failover. If you implemented that in conjunction with heartbeat over a crossover cable between dedicated NIC's (which would remove a failed switch/router out of the equation), you could probably automate it.


All times are GMT -5. The time now is 01:49 AM.