general load balancing issues

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Dec 15 04:42:40 PST 2003


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? 

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 at ... material.

	Cheers,

	Matthew

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20031215/b3b2ef85/attachment.bin


More information about the freebsd-hackers mailing list