Help - Search - Members - Calendar
Full Version: Help needed: One site two servers, load balance
The Planet Forums > Control Panels > Plesk
email4fun
Help needed: One site two servers, how to get clients to the right server. We have two servers here at RS, one has multiple sites on it, one that is going to become super heavy with traffic again come March for April Fools day.

We have another site setup as www2.

My question is how can we basically send clients to the second server if the first one is too slow or is responding to too many clients.

IN a sort, this is like load balance, but RS can't do actual load balance, any ideas?
hansm
round robin dns
NightHawk
QUOTE
Originally posted by email4fun
Help needed: One site two servers, how to get clients to the right server.   We have two servers here at RS, one has multiple sites on it, one that is going to become super heavy with traffic again come March for April Fools day.

We have another site setup as www2.

My question is how can we basically send clients to the second server if the first one is too slow or is responding to too many clients.

IN a sort, this is like load balance, but RS can't do actual load balance, any ideas?


ok...here is the easy way (you should be running your own dns to do this)...

just add 2 A records for your domain in your dns for that domain. One A record will point to the first server's ip# ..the second A record will point to the second servers ip#. This is a built in feature of bind. Your traffic will be somewhat balanced this way.

Another option:
if your domain is domain.com
domain.com is on server1 and server2
put ns1.domain.com on server1
put ns2.domain.com on server2
A record on ns1 is ip# on server1 for domain.com
A record on ns2 is ip# on server2 for domain.com
list ns1 and ns2 in your whois for domain.com
approx half of your traffic will hit each nameserver


(yes..you can get much more complicated then this..but this should point you in the correct direction).


Hope that helps cool.gif
hansm
nighthawk this will only work when ns1 is down and then its going to server 2, thats why the people of round robin dns made there dnsserver, with round robin dns you can do this but not with bind.
NightHawk
QUOTE
Originally posted by hansm
nighthawk this will only work when ns1 is down and then its going to server 2, thats why the people of round robin dns made there dnsserver, with round robin dns you can do this but not with bind.


ok..don't tell my sites that are working with that setup that it isnt' supposed to work.....the traffic is split almost 50/50 between 2 servers that way...lol
email4fun
all right, the suggestions looked good to start with about setting up the different name servers. So how else can we do this, Round Robin DNS seems like the best way to go, so what should we do?
daveman692
QUOTE
Originally posted by email4fun
all right, the suggestions looked good to start with about setting up the different name servers.  So how else can we do this, Round Robin DNS seems like the best way to go, so what should we do?

Round robin is definitrly the easiest and cheapest, the downside is if a server is down the users that have it in their DNS info will not get directed to the other one.
NightHawk
Just a couple of links you might want to check out to get yourself started in the correct direction.

http://www.acmebw.com/askmrdns/archive.php...y=85&question=1

http://heidi.vergenet.net/linux/mail_farm/...tml/node10.html


http://www.rim.edu.bt/manual/linux/config/...g/bind-8.2.html

http://www.isc.org/ml-archives/bind-users/...1/msg00951.html



those should help you get started.....
hansm
you right nighthawk, i didt know this one, because i did hear about alot of people are using round robin dns for this.

and alot people are thinking that bind isnt supporting load balacing, but thx for the info did learn something today again.

what is server 1 is down, will everything be redirected to server 2 with this setup too, let me know it?
hansm
im reading now that round robin dns is the name for multiple a records or cname records.

didt use round robin dns, thats why i didt know the complete story, thx for your info nighthawk.
NightHawk
No problem....

and yes....as long as your TTL's are set on a very short leash....if server1 is down...traffic will get to server2....otherwise...visitors who are cached...may not get thier immediatly. It isn't a perfect system...but it is way ahead of only having the site on one server cool.gif
hansm
yep i know everything about the TTLS.

while I do appreciate the offer...please keep offers to pm's
jd_waverly
Make sure you realize that if one of your server's goes down you need to remove the downed server's A record from the round robin ASAP.

Otherwise clients WILL BE directed there 50% of the time.

IE will autofailover most of the time to the other record but forget about it for SSH, FTP, or SMTP.

AS long as the TTL on the records is set reasonably short things should propagate quickly.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.