LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-10-2008, 09:05 AM   #1
diilbert
Member
 
Registered: Nov 2003
Location: North of the Border
Distribution: Gentoo & Debian
Posts: 155

Rep: Reputation: 30
Question 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!
 
Old 10-10-2008, 10:31 AM   #2
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

Rep: Reputation: 33
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).
 
Old 10-10-2008, 10:51 AM   #3
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,601

Rep: Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570
Quote:
Originally Posted by DotHQ View Post
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.
 
Old 10-10-2008, 11:33 AM   #4
diilbert
Member
 
Registered: Nov 2003
Location: North of the Border
Distribution: Gentoo & Debian
Posts: 155

Original Poster
Rep: Reputation: 30
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.
 
Old 10-10-2008, 03:50 PM   #5
rhelaine
LQ Newbie
 
Registered: Apr 2006
Posts: 17

Rep: Reputation: 0
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
 
Old 10-10-2008, 05:11 PM   #6
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,601

Rep: Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570Reputation: 2570
Quote:
Originally Posted by diilbert View Post
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.
 
  


Reply

Tags
debian, failover, lvs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why use an enterprise software solution vesus a diy (home made) solution checkmate3001 Linux - Server 1 12-16-2007 02:24 PM
LXer: Ten ideas about Ideas LXer Syndicated Linux News 0 11-05-2006 08:21 AM
ideas anyone? ohfaney Programming 1 05-17-2006 11:11 PM
Ideas for best Single Sign-on solution? humbletech99 Linux - Networking 4 02-02-2006 04:43 AM
I need some ideas.... trey85stang Linux - Enterprise 3 12-20-2004 07:50 AM


All times are GMT -5. The time now is 03:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration