From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 15 12:33:21 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FF9A16A4CE for ; Mon, 15 Dec 2003 12:33:21 -0800 (PST) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E5A143D36 for ; Mon, 15 Dec 2003 12:33:19 -0800 (PST) (envelope-from kientzle@acm.org) Received: from acm.org ([66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id hBFKXHkX048341; Mon, 15 Dec 2003 12:33:18 -0800 (PST) (envelope-from kientzle@acm.org) Message-ID: <3FDE1A8D.600@acm.org> Date: Mon, 15 Dec 2003 12:33:17 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: general load balancing issues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2003 20:33:21 -0000 On Mon, 15 Dec 2003, Matthew Seaman wrote: >On Mon, Dec 15, 2003 at 12:46:52PM +0100, Bogdan TARU wrote: > >> I am wondering, though, if I will be able ... to load-balance the domains >> involving sessions: will the sessions be lost when connsecutive hits >> go to different webservers, or not? It depends on where you store the session info, of course. I'm not as familiar with PHP, but I know that Java servlets/JSP default to storing all session info in RAM, which does glue each session to a particular server. Check the load-balancer you're using and see if handles "session persistence." In a nutshell, this gaurantees that successive requests from the same user always go to the same server. This approach has its drawbacks, but it works pretty well in practice. >The canonical answer to this is to store the session data in the >back-end database, so that it's accessible to all of your servers. This depends a lot on the level of traffic you're trying to support. For <100 dynamic pages/second, this is pretty straightforward; I've prototyped systems that could top 10,000 dynamic pages per second using a shared session server, but very few people need that kind of performance. Tim Kientzle