[nycphp-talk] APC for a custom PHP session handler
Steve Manes
smanes at magpie.com
Wed Mar 25 00:03:11 EDT 2009
John Campbell wrote:
> Don't do it. It is either a solution to a problem you don't have, or
> the wrong solution. APC has one datastore per server, which will be a
> disaster once you have more than 1 front end machine, or if you have
> to restart the webserver then all your users will get logged out.
I'm aware that it's a single server solution. So is the stock /tmp
session storage. However most web sites are single server and are
unlikely ever to be clustered so there's definitely a "market" for it.
Worst case, since PHP's session support is so well partitioned, if you
should need to cluster later you can always return to a database
solution for session support without affecting your application code.
I'm just floating an idea here. If you're already employing APC, using
its user cache space for session data store would save one round trip to
the database per session-targeted page request, which isn't insignificant.
I'm just wondering if there are some other reasons for not using APC for
this.
More information about the talk
mailing list