homepage Welcome to WebmasterWorld Guest from 54.81.80.46
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
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
bwakkie




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

Hi,

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! ;-)

thanks,

Bastiaan

 

bwakkie




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

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

FourDegreez




msg:3896971
 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?

bwakkie




msg:3898439
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved