mod_perl best practice?

Brad Fitzpatrick brad at danga.com
Fri Nov 4 11:37:11 PST 2005


On Fri, 4 Nov 2005, Paul Dlug wrote:

> What's the best practice for using Cache::Memcached with mod_perl? Is it
> safe to instantiate one instance of Cache::Memcached per process and have
> all other modules use a global variable to access it? (If not how else would
> you handle connection pooling?)

Yeah, a "global" ("singleton") is what a lot of people do.  But do it
after the mod_perl fork so different processes aren't sharing the same
sockets.

> How does failure of a node work? I know that it rehashes over the nodes that
> are alive but does it recheck the health of the failed node and add it back
> into the loop?

Yes.

>
>
> Thanks,
> Paul
>


More information about the memcached mailing list