What is meant by Session Clustering?

The Session Manager session support allows multiple server instances to share a common pool of sessions, known as a session cluster.

Session clustering setting up methods :

#1)First methods, is to have a NFS shared where session will be store. Setting this is quite easy, just a little modification on php.ini file to change the “session.save_path ? directive to point to the NFS share. The main problem with NFS is on high traffic, NFS share is really slow. So synchronisation and data corruption can arrive and this can be very frustrating.

#2) The Second method is to use a Database to store session datas. This solution suppose to write custom session handler. The only real problem of this method is that will generate a very big amount of the number of connections and database query. And this required a dedicated server and a cron job to clean all unused session datas.

#3)The third method is to use the MCache. MCache is a daemon (a server) that deal with session storing only. It support from RAM storage to data serialization in file/fatabase. It is said that MCache access is native as a session handler in PHP, so it’s just about configuration via php.ini … but I did not investigate yet on how to make it work.

#4)The fourth method is Memcache, another daemon for “distributed memory object caching system ?. Advantage to Memcache, as it’s integrated in PHP as PECL (look at the documentation on how to install). This method can be very interesting as it provide great performance but this will require a single or couple dedicate server of it use.

#5)The last method is commercialized by Zend. The product is the Zend Platform and integrate many component of some previous Zend products (Zend Server, etc.) and some new products (Zend Core…). The Zend Core is a Cluster manager that can handle multiple server. It can be use to remote debugging (from Zend Server), performance monitoring and sessions replication. As described, there are many advantage using Zend Platform so I could only to advise you to use it simply first to profile your application and for session clustering ! But there are a little probleme, session are replicated from a server to the other servers. So if a server crash maybe the Platform could not have the time to replicate session data. It can result to session destruction. But be sure that Zend know the problem and will surely fix this soon or later.

0 comments:

Post a Comment

Post your helpful suggestions on this...

 
 
 

typo3 cms templates tutorial

PHP news

php freelancer mumbai India