Linux Support, Hosting & Security Hertfordshire

Thursday, 4 February 2010

Using PHP sessions in a clustered HA apache setup

So you have a cluster of two or more apache servers and want your php sessions to be shared between the different apache servers?

One great solution is to use memcache. It's a Free & open source, high-performance, distributed memory object caching system and can support the mirroring of sessions to multiple memcache servers (which could be on each apache server). Also your sessions are stored in RAM so they are nice and quick too!

This blog post has a nice setup guide. php session clustering with memcache

More info on memcache.

Did this post help you? Thank us with bitcoin;