NYCPHP Meetup

NYPHP.org

[nycphp-talk] sessions and load balancing

Dan Cech dcech at phpwerx.net
Mon Nov 8 15:46:23 EST 2004


Matthew Terenzio wrote:
> On Nov 8, 2004, at 3:15 PM, Adam Maccabee Trachtenberg wrote:
>> On Mon, 8 Nov 2004, Matthew Terenzio wrote:
>>
>>> For applications using sessions, what are some strategies for being
>>> able to scale to a multiple box level?
>>
>> * Store session on client (cookies)
> 
> Will forcing sessions to use cookies solve the problem completely. Can 
> you think of any issues that might arise?
> Forgive me for asking before I look, but it seems like a DB backed 
> session solution would be a great PEAR project.

I think what Adam was referring to was storing the actual session 
content in a cookie, rather than just the session_id.

This can work provided your session data is small, and you don't ever 
trust it any more than any other data provided by the user.

As for Database backed sessions, they can and do work very well.  I'd 
suggest you take a look at ADOdb's solution here:

http://adodb.sourceforge.net/

It has a well implemented system which support various 'plugins' or 
'filters' such as encryption and/or compression of the session data.

Dan



More information about the talk mailing list