Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jul 2002 12:03:29 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        RDWestSr <rdwestsr@hotpop.com>
Cc:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Question about FreeBSD Server Box...
Message-ID:  <20020727110329.GC32984@happy-idiot-talk.infracaninophi>
In-Reply-To: <3D41DAD9.5759F9FC@hotpop.com>
References:  <3D41DAD9.5759F9FC@hotpop.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 26, 2002 at 07:27:21PM -0400, RDWestSr wrote:

> someone plz gues-ta-mate to me how many peeps can browse my server at
> same time???
> (apache/php/mysql  -  no ftp and downloading   -  just website service)
> i have p3-500 intel  -  256 SDRAM  -  (1Mbit -Up/Down)
> i have no clue as to how many will over load my box...

That's a hard question to answer.  The maximum number of concurrent
users depends on all sorts of different things, but I'd suspect that
the limit you'll run into first is running out of RAM.  

Probably a more productive way to approach the question is to pick a
number X of concurrent users and try to simulate that many users using
such programs as Apache Bench (/usr/local/sbin/ab, comes with Apache)
or other WWW performance measures many of which can be found in ports.
 
> and one last question -
> i've heard of a round-robin load balancing setup.
> could someone send me links to some really good tutorials of round robin
> setups??

There's several different types of round-robin possible.  They all
have the common factor of running at least two web servers with
identical content, and distributing incoming connections across them.

See http://www.webtechniques.com/archives/1998/05/engelschall/ for a
good discussion.

The simple, cheap method is to use the DNS --- configure things so
that a lookup of www.yourdomain.com returns a list of the IP numbers
of all of your servers.  That's as simple a putting in several A
records in your zone file:

    www     IN    A   123.45.67.1
                  A   123.45.67.2
                  A   123.45.67.3
                  A   123.45.67.4

and the DNS will cycle through the list of addresses on sequential
lookups.  This should mean that, statistically, all your servers see
an approximately equal number of requests.  It also means that you
have to be careful to design your content to work in a stateless
manner --- fine if you're just serving up static HTML, but for dynamic
stuff you've either got to pass all of the session data to and fro for
every round trip between server and client, or keep all that
information in a back end database and use cookies to identify the
session.

The disadvantages of this setup are that:

    a) It doesn't guarantee any sort of load balance at all.  If much
       of your traffic comes from a particular site, you can find that
       DNS caching means that they all end up connecting to the same
       server.

    b) It has no mechanism for coping with one or more of your servers
       being out of action.  Effectively, if one of your machines goes
       down, it will affect your whole site.  Ironically, adding more
       servers just increases the chance that something will have gone
       wrong somewhere and so makes your site *less* reliable.

    c) It doesn't work at all well for HTTPS, or for setups where
       there's session data stored locally on the server.

If you want a more fully featured load balance, you're going to have
to invest some money in equipment.  You can use reverse proxying with
an ordinary PC and apache to cope with much of the above, but
generally if your site is big enough and busy enough to warrant this
sort of treatment you should be thinking about buying specialist
hardware.  See for instance
http://www.nortelnetworks.com/products/01/alteon/index.html or
http://www.coyotepoint.com/ or
http://www.cisco.com/warp/public/cc/pd/cxsr/400/index.shtml

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
Tel: +44 1628 476614                                  Marlow
Fax: +44 0870 0522645                                 Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020727110329.GC32984>