Techblog Careesma Just another Network site


Repcache & PHP = ‘Sessions on steroids’

Posted by Albert Horta

When I learned PHP, I always did think that sessions are great stuff that the PHP guys have given to us developers. But, playing with huge traffic websites (mainly when we have to handle multiple front ends), I always perceived it as huge limitation.

What do I mean? Simply put, sessions by default are saved on the machine that serves php. This means that we need to ensure that our incoming users always go to the same web server. We solved that problem (previously) using the expertise of our Systems team; they would 'stick' our sessions to one server. Great solution but with great problems. If a server fails (and we know that never happens, heheheh), every single user 'stuck' to that server gets thrown off with it.