Date: Mon, 15 Dec 2003 12:42:03 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-hackers@freebsd.org Subject: Re: general load balancing issues Message-ID: <20031215124203.GA19265@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20031215114652.GA74902@icomag.de> References: <20031215114652.GA74902@icomag.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031215124203.GA19265>
