From owner-freebsd-questions Sat Jul 27 4: 3:41 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0ECC537B400 for ; Sat, 27 Jul 2002 04:03:37 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CF1B43E31 for ; Sat, 27 Jul 2002 04:03:36 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk ([IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.5/8.12.5) with ESMTP id g6RB3ZXZ033492; Sat, 27 Jul 2002 12:03:35 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.5/8.12.5/Submit) id g6RB3TKg033491; Sat, 27 Jul 2002 12:03:29 +0100 (BST) Date: Sat, 27 Jul 2002 12:03:29 +0100 From: Matthew Seaman To: RDWestSr Cc: freebsd-questions Subject: Re: Question about FreeBSD Server Box... Message-ID: <20020727110329.GC32984@happy-idiot-talk.infracaninophi> References: <3D41DAD9.5759F9FC@hotpop.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D41DAD9.5759F9FC@hotpop.com> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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