Re: Keeping sessions
| From: | Stut | Date: | Tue, 19 Jun 2007 11:15:00 +0000 |
| Subject: | Re: Keeping sessions | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257384@lists.php.net to get a copy of this message | ||
Richard Heyes wrote:
Stut wrote:What do you mean by "session server"? How are you accessing the session data on another server? -Stut -- http://stut.net/Jorge González wrote: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.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.