| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-16-2007, 04:59 AM
|
#1
|
|
Member
Registered: Sep 2003
Posts: 72
Rep:
|
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
|
|
|
|
05-16-2007, 06:27 AM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,692
|
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
|
|
|
|
05-16-2007, 06:39 AM
|
#3
|
|
Member
Registered: Sep 2003
Posts: 72
Original Poster
Rep:
|
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
|
|
|
|
05-16-2007, 07:23 AM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,692
|
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...
|
|
|
|
05-22-2007, 03:10 AM
|
#5
|
|
Member
Registered: Sep 2003
Posts: 72
Original Poster
Rep:
|
Well the boxes are 1200km from each other.
That's the problem. Otherwise the system would be much more easier.
|
|
|
|
05-22-2007, 03:45 AM
|
#6
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,692
|
and you never thought that might be useful to say that before?
|
|
|
|
05-22-2007, 06:10 AM
|
#7
|
|
Member
Registered: Sep 2003
Posts: 72
Original Poster
Rep:
|
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.
|
|
|
|
05-24-2007, 03:17 AM
|
#8
|
|
Member
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 212
Rep:
|
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 ?
|
|
|
|
05-24-2007, 03:27 AM
|
#9
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,692
|
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.
|
|
|
|
05-24-2007, 03:27 AM
|
#10
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,692
|
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.
|
|
|
|
05-27-2007, 02:42 AM
|
#11
|
|
Member
Registered: Sep 2003
Posts: 72
Original Poster
Rep:
|
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...
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:29 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|