Using memcached/APC for session storage?

Posted by Industrial on Stack Overflow See other posts from Stack Overflow or by Industrial
Published on 2010-05-26T22:54:21Z Indexed on 2010/05/26 23:01 UTC
Read the original article Hit count: 166

Filed under:
|
|
|
|

Hi everybody,

I had some thoughts back ago about using memcached for session storage, but came to the conclusion that it wouldn't be sufficient in the event of one or more of the servers in the memcached pool were about to go down.

A hybrid version is to save the main database (mySQL) from load caused by reads would be to work out a function that tries to fetch the data from the cache pool, and if that fails gets it from the database.

After putting some more thought into it, I started to think about using APC cache for session related data. If our web server would go down, sessions would be lost either way, so storing them in a local APC or a localhost memcached server maybe isn't that bad?

What's your experiences?

© Stack Overflow or respective owner

Related posts about php

Related posts about sessions