No, the servers in the cluster should not know of each other, it is the
whole point of the memcached design that they do not. It is precisely that
property that makes it scale linearly.

If you think the performance of your application will be impacted negatively
by having to access a cache server over the network, you shouldn't use
memcached in the first place, you should use an in-process cache in your web
application instead.

The best setup in your case is to have a memcached instance on each
webserver and just let the cache plugin do what it does.


/Henrik

On Thu, Jul 9, 2009 at 23:25, DLS <[email protected]> wrote:

>
> Hello all,
>
> A question about clustering memcached. I currently have a website with
> two front ends. Each front end runs a single instance of memcached.
> And both servers connect to the same database server. They run
> wordpress and via an object-cache plugin, I believe it checks both
> instances of memcached on both front ends for cached objects. It's
> given an array of memcached server:ports.
>
> My questions is if there is any way to have both instances of
> memcached know of each other so that the code can only have to connect
> to its local memcached instance? As opposed to having to make a
> connection to the other server's memcached instance? I'm think about
> whether it effects performance when having to connect to another
> server.
>
> Otherwsie, what's the best way to have this set up? Assuming 2 (or
> more) frontends each running an instance of memcached? And wanting to
> keep the two front ends in sync with each other.
>
> Thanks!
> Dan

Reply via email to