Memcached PHP Sessions
roze at roze.lv
Mon Feb 5 17:46:08 UTC 2007
> if your reason is to maintain sessions across web servers then you should
use load balancer. no coding is needed, local file system is very fast and
storage is cheap.
Filesystem handling 100k files (or 4mil on our case) - pain in the ass even
its tmpfs you end up wasting much space (because of the blocksizes).
Second, you are pretty stuck with the "AJAX case" - php cant write to
session file if another process is using it. The file is locked until the
first php finishes/releases the lock (or you have to use
http://php.net/session_write_close ). If web page loads lets say 3 ajax
requests wich all relay on session data the remaining 2 have to wait. In
memcached there are no such locking issues.
More information about the memcached