homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Round robin Load-balance and php sessions
A fatal combination. Sessions are lost -> unusabel application

 8:00 am on Apr 21, 2009 (gmt 0)


After activating an old application that was using php sessions (in the mean time we are on a load balanced round robin system) it happened that users where losing answers.

Problem the sessions are on the wrong server sometimes.

So what would you do?

1) ip based load-balancer
- could overload one machine if people access though one ip
+ no application change

2) Session-persistent load-balancing
- performance of the lb
+ no change to the application

3) Sharing session information through NFS
- nfs file locking
- single point of failure
+ no application change

4) Storing session in a database
- what if both servers update at the same time?
- need to rewrite php default session handeling
+ no application change

5) Zend Session Clustering using a Session clustering Deamon
- unclear pricing? Part of Zend Platform
+ no application change

We tend to use perhaps go for 3 or 4. Are there options pros and cons I missed?

New google feature? type "php session cluster module"
I got a captcha to fill in! ;-)





 11:57 am on Apr 21, 2009 (gmt 0)

6) Or... memcache in combination with a database as backup?
+ Quick and save


 1:12 pm on Apr 21, 2009 (gmt 0)

#1 is the simplest solution. Wouldn't it be easiest to try that first before moving on to more complex options?


 9:11 am on Apr 23, 2009 (gmt 0)

it is simple but not robust enough...
We will go for the 6th solution.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved