Is memcached a good way to store session share ammong web servers?

Serhat Sakarya serhat at sakarya.nl
Mon Nov 27 22:04:18 UTC 2006


We're using clustered sessions too. However, we decided to kick out PHP's
session handler altogether and just use our own Session object. It's really
not that much more complicated. The session cookie handling is quite
straightforward.

I completely agree with your point regarding the load balancer. It's nice to
be able to connect to any node and still be logged in with the same session.
This moves the complexity away from possibly expensive load balancers.

Regards,

Serhat

On 11/16/06, Kevin Burton <burton at tailrank.com> wrote:
>
> We (Tailrank) are using memcached to store PHP sessions. I can publish the
> code if anyone's interested.  We basically save/restore $_SESSION within
> memcached.
>
> We over provision our memcached nodes so the LRU GC doesn't kick in.
>
> It works really well.  This also means that our load balancer can be
> stupid as hell and doesn't need to worry about what HTTP server to send a
> user since any machine has access to the session anywhere with the cluster.
>
> On 11/12/06, howard chen <howachen at gmail.com> wrote:
> >
> > Anyone used memcached to store sessions?
> >
> > Are there any special thing need to take care of? e.g. session expire?
> >
> > Thanks.
> >
>
>
>
> --
> Founder/CEO Tailrank.com
> Location: San Francisco, CA
> AIM/YIM: sfburtonator
> Skype: burtonator
> Blog: feedblog.org
> Cell: 415-637-8078
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20061127/49f41adb/attachment.html


More information about the memcached mailing list