From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 15 04:42:40 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 1FB3F16A4CE for ; Mon, 15 Dec 2003 04:42:40 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 780AD43D37 for ; Mon, 15 Dec 2003 04:42:37 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) hBFCg3D3019426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Dec 2003 12:42:33 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id hBFCg3GS019425 for freebsd-hackers@freebsd.org; Mon, 15 Dec 2003 12:42:03 GMT (envelope-from matthew) Date: Mon, 15 Dec 2003 12:42:03 +0000 From: Matthew Seaman To: freebsd-hackers@freebsd.org Message-ID: <20031215124203.GA19265@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20031215114652.GA74902@icomag.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline In-Reply-To: <20031215114652.GA74902@icomag.de> User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on happy-idiot-talk.infracaninophile.co.uk Subject: Re: general load balancing issues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list 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 12:42:40 -0000 --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 15, 2003 at 12:46:52PM +0100, Bogdan TARU wrote: > Right now I am considering a setup with one common NFS repository for > the configuration files, Apache binaries, Web content and temp > directory for PHP, NFS resource which will be mounted on all the > 'front' webservers. I am wondering, though, if I will be able (by > having one common temp directory for PHP) to load-balance the domains > involving sessions: will the sessions be lost when connsecutive hits > go to different webservers, or not?=20 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. See the PHP docs for session_set_save_handler(). There's an example of how to do this in the O'Reilly Platypus book "Web Database Applications with PHP and MySQL", or contact me off list and I can send you some sample code. Probably a good idea to take this off-list anyhow, as it's not really hackers@... material. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --lrZ03NoBR/3+SXJZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/3awbdtESqEQa7a0RAomYAKCFZC+yOByubtWhoS2IKuRtizr18wCeN/K+ VGSQ2eSgaRig1+bB6ecU20U= =tERO -----END PGP SIGNATURE----- --lrZ03NoBR/3+SXJZ--