This article is also available in our new Knowledge Base: Enabling Session Clustering on Live Cluster
Zend Server Cluster with Session Clustering
When enabling Zend Session Clustering, you might start getting errors in Zend logs and users will be kicked out of the log-in system.
This is a sample sc.log:
[Mod Cluster 11.11.2014 02:54:31 NOTICE] 00263: [ mod_cluster.cpp : 623 ( ps_read_cluster ) ] failed to read session 6k0odt6jo4f2djk409jl0a3bb29hdhg5
[Mod Cluster 11.11.2014 03:00:02 WARNING] 00160: [ mod_cluster.cpp : 1394 ( getSession ) ] Failed to get session. Reaso…
Zend Session Clustering uses a different session ID than regular PHP sessions, although the flow / code integration is transparent to PHP and users.
Because of this modified session ID (PHPSESSID cookie by default), all sessions which are still tracked on client side and requested again, will be dropped as invalid, and new sessions with SC ID format would be created instead (so basically, session data is lost, users are logged out if the session has no DB backend etc.).
Session Clustering should be enabled on Zend Server installation when no users are affected, or more clearly, enabled while a server / cluster is out of load balancer and before getting live HTTP requests.
Taking a server / cluster off service to enable Session Clustering also means that expired sessions are anyway being refreshed so less users are affected.
About Zend Server Session ID format, it is as following: