Hi everyone,
I have thought a bit on how to make sure that a particular key is
distributed to ALL memcached servers in a pool. I have yet found no
good solution.
My current, untested solution is to make another instance of
memcached, something like this:
$cluster['local'] = array('host' => '192.168.1.1', 'port' =>
'11211', 'weight' => 50);
foreach ($this->cluster() as $cluster) {
@$this->tempMemcache = new Memcache;
@$this->tempMemcache->connect($cluster['host'],
$cluster['port']);
@$this->tempMemcache->set($key, $value, $this->compress,
$expireTime);
@$this->tempMemcache->close();
}
What is common sense to do in this case, when certain keys need to be
stored on ALL servers for reliability?