Memcached PHP Sessions

Reinis Rozitis roze at roze.lv
Tue Feb 6 11:19:51 UTC 2007


howard chen wrote:
> 1. are you serving 1M users using just 1 web server? if not, sessions
> should be distributed ammong web servers of their local filesystem.
Nope, 10 web-frontends at the moment, and where it becomes complicated.
In case of a local filesystem you have to use a balancer/solution which
distributes users to different servers and  never changes afterwards,
cause when the user is thrown on a different server the session is lost
cause there is no session file on that server. And the whole idea of
balancing is gone (guess what happens when one server with 10k
users/session goes down).
Besides we have tried with Cisco Content Switch which operates that
way.. and it didnt handle the load.

At the moment we can use simple round-robin dns balancer or whatever
solution we want.
> 2. you have 1M users but have 4M session files? consider if you have
> 10-20 % of frequently used active users (which is quite high in fact),
> you have too many useless session files.
That only means I have plenty of space/resources to expand (eg start to
clean in more aggressive manner (but I like the lazy approach))) and it
doesnt affect anything :)

rr



More information about the memcached mailing list