this is not an HAProxy related problem What you need is to share the session across all webservers. You have several ways to do it: memcache, redis, db, filesystem.
We currently are using memcache for this check your php.ini for "session.save_handler" we have something like: session.save_handler = memcache session.save_path = "tcp://mmc-server-01:11211,tcp://mmc-server-02:11211" some more info: http://php.net/manual/en/session.configuration.php Once you do this, haproxy will keep using the same algorithm to balance but webservers will be able to find/reuse the session users were on. Saludos On Fri, Mar 11, 2011 at 11:37 AM, Thomas Manson <dev.mansontho...@gmail.com>wrote: > Hi, > > I've setup HAProxy to loadbalance the traffic across two web servers that > runs some PHP website (based on JOOMLA, OSCommerce and some other solution) > > However I've noticed that the session affinity is not working Out Of The > BOX (which after 2sec of think is quite logical ;)) > > Does anybody have some pointers to configure HAProxy (and if necessary > PHP) to make this work ? > > Thanks, > Thomas. > -- Gabriel Sosa Si buscas resultados distintos, no hagas siempre lo mismo. - Einstein