Google Answers Logo
View Question
 
Q: Server Load Distribution ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Server Load Distribution
Category: Computers > Internet
Asked by: bl00d-ga
List Price: $15.00
Posted: 17 Apr 2003 03:23 PDT
Expires: 17 May 2003 03:23 PDT
Question ID: 191650
I run a website on a dedicated server, hosted on Rackshack.net.  The
server is a 1.3ghz Celeron, and if trends continue, my traffic should
overload this machine sometime this summer.  This means I will need
either a more powerful server (I do not want this), or an additional
server to handle the requests.  I would like to have some sort of load
distribution system in place, so that incoming requests would be
alternated between the two servers.

Since the amount of traffic will still be relatively tiny (in
comparison to large sites like Google and Amazon), I don't need or
want a complex nor expensive system.  I don't want to buy my own
router, or house any equipment myself.  I want to keep both servers
with RackShack, but have some software-based solution to handle the
traffic routing.

What is your recommendation for a system that will combine efficiency
with little or no cost?  I am also not extremely advanced in my
networking skills, so whatever solution I choose must also be
relatively easy to set up and maintain.

Clarification of Question by bl00d-ga on 17 Apr 2003 03:27 PDT
Please include a brief description of how I should implement whatever
system or systems you recommend.  You don't need to walk me through
the entire thing, especially if there is thorough documentation
available elsewhere.  Please do include links to as much information
as you can find though.  Thanks.

Clarification of Question by bl00d-ga on 17 Apr 2003 04:59 PDT
Thanks to whomever has been working on this question for so long. 
Rest assured that I will tip well if your answer is excessively
useful.  Thanks again.
Answer  
Subject: Re: Server Load Distribution
Answered By: alexander-ga on 17 Apr 2003 10:18 PDT
Rated:5 out of 5 stars
 
It sounds like your primary criteria are simplicity and cost. If
that's the case, it doesn't get much easier or cheaper than these two
solutions.

The easiest is something called "round robin DNS". You probably know
that your server currently has an IP address, say "1.2.3.4", and a
hostname, say "www.site.com". When a user types "www.site.com" into a
browser, their computer asks the DNS system for the IP associated with
that address, and in this case gets "1.2.3.4". Then the user's
computer connects directly to that IP address to get the web site.

In a round robin DNS scheme, there is more than one IP address
associated with a single hostname. Say you associate both "1.2.3.4"
and "1.2.3.5" with "www.site.com". Now, the first user to enter
"www.site.com" into their browser will see the associated IP address
as "1.2.3.4", the second user will get "1.2.3.5", the third user will
get "1.2.3.4" again, and so on.

Assuming your DNS is managed by Rackspace, they should be able to help
you set this up. All you need to do is let them know that you want to
associate two IP addresses (one for each of your servers) with a
single hostname, to do round robin DNS.

Now, just make sure you have the exact same content on both servers at
all times, and you're all set.

There's some more information about this, including a discussion of
the advantages and disadvantages, at:
http://www.onjava.com/pub/a/onjava/2001/09/26/load.html

A second method for distributing load is setting up each server
individually, and then simply splitting the content between them. Many
popular sites, for example, put images on a separate server than HTML
files, and then simply reference the images by their full urls, e.g.
"http://images.site.com/foo.jpg"

You can, of course, split the content by whatever makes the most sense
for your site. You could put a certain set of pages on one server, for
example, and other pages on the second server. Again, all you need to
to is reference pages or images by their full URLs, including
hostname, whenever you refer to content that is on the other server.

This method will require a little more hand-tweaking in order to even
out the load between servers, as well as the effort required to
rearrange the files that make up your site and adjust references.

Other methods of load-balancing are available, of course, including
hardware solutions, dedicated load balancing servers, etc., which may
perform better under certain circumstances, but they are generally
much more complex and/or expensive. For sites just starting out with
load balancing, one of the two simple techniques above should be more
than enough.

If you need more information, or have any specific questions, please
request a clarification before submitting a rating. If you do, it
would also be helpful to know what OS and HTTP server software you're
using.

Request for Answer Clarification by bl00d-ga on 20 Apr 2003 00:55 PDT
The server is hosted with Rackshack, not Rackspace.  The kind folks at
Rackshack said they will be unable to help with anything of this sort.
 However, the server that I have from them  has its own DNS server on
it.  Can I use that server?  Other than that, this sounds like
everything I need.  Thanks a bunch.

Clarification of Answer by alexander-ga on 20 Apr 2003 11:08 PDT
Sorry, typo -- I meant Rackshack.

You should have access to the configuration for your domain. When you
do a whois on your domain, there's a section at the bottom called
"Domain servers in listed order:". The first machine on that list is
usually the one you need to change. IF the IP address shown is your
machine, then the DNS is running primarily off of your machine, and
you can update its configuration. You didn't say what OS you're using,
but if you're using BIND on a UNIX architecture, see this example for
what the configuration files should look like:
http://www.rim.edu.bt/manual/linux/config/bind-8.2.html

You would need to add another A record in the zone file. In the
example, it's "/var/named/rim.zone" (your filename will be different).
There will be one entry for your current machine, e.g.:

www   IN   A   1.2.3.4

You would just need to add another for the second machine:

www   IN   A   1.2.3.5

But I must say that having to enter this information by hand in a
managed hosting environment is quite unusual. The host will usually do
this for you, or provide a custom management interface for your
domain. You can also have your DNS hosted elsewhere for a trivial fee
(e.g. http://www.123cheapdomains.com , $14/year including registration
), and then just use their managed DNS services to point back to your
Rackshack servers.

If Rackshack will normally update your DNS configuration, but they're
a bit confused by the round robin thing, the procedure is exactly the
same as if they were adding another host to your domain, e.g.
"www2.yoursite.com", except that one hostname happens to have two
entries with different IPs.

Clarification of Answer by alexander-ga on 20 Apr 2003 11:24 PDT
Oops, I just wanted to let you know that I thought 123cheapdomains
would do what you needed, but it appears that they may not, only
letting you edit CNAME records, not A records. http://www.pairnic.com
, however, does let you edit A records, and in fact specifically
mentions "Set Round Robin DNS" as a feature for the included Custom
DNS service. pairNIC is only $18/year including registration.
Transferring your domain to pairNIC may be the easiest way to
accomplish what you want, even if you can edit your own domain server
configuration.
bl00d-ga rated this answer:5 out of 5 stars and gave an additional tip of: $5.00
Sorry it took me so long to give a rating.  Thanks a lot.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy