I'd be surprised if this is how it's actually set up. I'm guessing the object-cache plugin hashes the key for the object to choose which server to set/get data. This means that (approximately) 50% of your data is stored on each memcached instance and load is shared between them, though no data should exist on both servers. Given that they're on the same network, the overhead is negligible and well worth it in exchange for the tradeoffs (scalability, durability, etc) On Thu, Jul 9, 2009 at 5:25 PM, 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 > -- awl
