Re: [PHP] Keeping sessions



Stut wrote:
Jorge González wrote:

In a web server cluster, how do you do guys keep the php sessions? I mean, with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is logged into an php app then this user goes always to the same backend server and if that server goes down then the session is invalid.

How to deal with sessions?


Several options exist, but the most common is to store session data in a database that can be accessed by all of the web servers. Alternatives include using memcached but recently I read something that suggested that can be problematic.

I believe the cluster support in Zend Platform includes this functionality, so depending on your budget that may also be an option.

Just a note: you could have either one of the web servers acting as the "session" server which the other web servers use or, if need be, a dedicated "session" server. I wouldn't imagine you'd need that though unless your site's really busy.

--
Richard Heyes
0844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software
.



Relevant Pages

  • Re: Web Farms and session handling
    ... > We have a problem which is correlated to web farms and session handling ... > Our setup is with a web farm, one ldap server and a database cluster. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: RDP sessions disconnected after server rejoins nlb cluster
    ... I have check the logs on our clients and on the affected ... server 11 and others are lost), ... cluster members are disconnected. ... Session redirection is achieved via ...
    (microsoft.public.windows.terminal_services)
  • Re: [PHP] Keeping sessions
    ... with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is logged into an php app then this user goes always to the same backend server and if that server goes down then the session is invalid. ... but the most common is to store session data in a database that can be accessed by all of the web servers. ... I believe the cluster support in Zend Platform includes this functionality, so depending on your budget that may also be an option. ...
    (php.general)
  • Re: [PHP] Keeping sessions
    ... with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is logged into an php app then this user goes always to the same backend server and if that server goes down then the session is invalid. ... but the most common is to store session data in a database that can be accessed by all of the web servers. ... I believe the cluster support in Zend Platform includes this functionality, so depending on your budget that may also be an option. ...
    (php.general)
  • Re: [PHP] Keeping sessions
    ... with apache backend webservers but If a user is logged into an php ... server goes down then the session is invalid. ... I believe the cluster support in Zend Platform includes this ...
    (php.general)