LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 05-16-2007, 04:59 AM   #1
macadam
Member
 
Registered: Sep 2003
Posts: 72

Rep: Reputation: 15
Server Failover


Hi!

I am running 2 servers.
I use round robin to balance the load but that's not what I really want as one server is 2 times slower than the other.
What I would like is to use the fast server as main server and the slow one as backup.

I need thus to set up a failover system.

What is the easiest way to do that?

Regards,

macadam
 
Old 05-16-2007, 06:27 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
depends at what level you want to implement is, but essentially you can use a heartbeat to pull an ip address across if it stops responding in the slave's opinion. check http://linux-ha.org or i was looking at a very simple specific implementation here... http://www.onlamp.com/pub/a/onlamp/2...inuxhacks.html
 
Old 05-16-2007, 06:39 AM   #3
macadam
Member
 
Registered: Sep 2003
Posts: 72

Original Poster
Rep: Reputation: 15
Hi,

I have just written a script that pings the main server and updates the DNS zone file accordingly.
Should work as I have a very short TTL.

Regards,

christophe
 
Old 05-16-2007, 07:23 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
can't say i like that approach. if this is at all internet facing, you can't guarentee those TTL's are adhered to at all. seems like a long long way round if those two boxes literally are next to one another...
 
Old 05-22-2007, 03:10 AM   #5
macadam
Member
 
Registered: Sep 2003
Posts: 72

Original Poster
Rep: Reputation: 15
Well the boxes are 1200km from each other.
That's the problem. Otherwise the system would be much more easier.
 
Old 05-22-2007, 03:45 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
and you never thought that might be useful to say that before?
 
Old 05-22-2007, 06:10 AM   #7
macadam
Member
 
Registered: Sep 2003
Posts: 72

Original Poster
Rep: Reputation: 15
Indeed it might have been wise to mention it.
But for me it was obvious...why should I have 2 servers at the same location.
In this case, we can only cover a hardware failure...not a network or power failure.

Sorry not to have described the problem more accurately.
 
Old 05-24-2007, 03:17 AM   #8
p_s_shah
Member
 
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 237
Blog Entries: 1

Rep: Reputation: 34
Hi,

Would you please give us idea, how you are load balancing two servers using round robin ?

Do you have any other scheduling option other than round robin, so that out of three requests, two requests will be server by main server and one by second server ?
 
Old 05-24-2007, 03:27 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by macadam
Indeed it might have been wise to mention it.
But for me it was obvious...why should I have 2 servers at the same location.
In this case, we can only cover a hardware failure...not a network or power failure.

Sorry not to have described the problem more accurately.
obvious? so you know nothing about conventional resilient architectures then...? two servers, two electrical supplies backed up by two ups's two halfs of a resileint network, two internet feeds... one site.

Last edited by acid_kewpie; 05-24-2007 at 03:29 AM.
 
Old 05-24-2007, 03:27 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by p_s_shah
Hi,

Would you please give us idea, how you are load balancing two servers using round robin ?

Do you have any other scheduling option other than round robin, so that out of three requests, two requests will be server by main server and one by second server ?
that'll be DNS, and not likely to help you one bit. DNS RR's only help spread the load of a busy server with a lot of clients. if it's only a few then it'll most likely be very unpredictable and asymmetric. may well be possible to just list one servers A record twice i guess.

Last edited by acid_kewpie; 05-24-2007 at 03:29 AM.
 
Old 05-27-2007, 02:42 AM   #11
macadam
Member
 
Registered: Sep 2003
Posts: 72

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie
obvious? so you know nothing about conventional resilient architectures then...? two servers, two electrical supplies backed up by two ups's two halfs of a resileint network, two internet feeds... one site.

Sorry chris but by experience:

- even a good hosting company can have all their connections down even with redundancy like you mention above (I have had the case with 3 providers yet)
- it is recommended to have 2 separate class C networks (at least for DNS)...difficult to find a provider having those class C's.
- so except for the power supply...well I need to select different hosting solutions at different places...
 
  


Reply



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
IP failover sanjibgupta Linux - Networking 6 05-04-2007 04:01 AM
LAMP server failover pridefc Linux - Software 3 12-11-2006 12:15 AM
Web server backup and failover panicbox Linux - Networking 4 08-29-2006 01:56 AM
server failover eph Linux - Networking 1 12-07-2005 07:07 AM
Linux Failover !!!!! Iptables_NEWBIE Linux - Security 8 08-16-2005 02:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration