server down, but its back up.. what should be done ?
evert at rooftopsolutions.nl
Thu Sep 21 15:26:05 UTC 2006
Thanks, that was exactly the answer i was looking for..
Mikael Johansson wrote:
> The pecl/memcache extension will retry failed servers after a user
> specified interval (default 15 seconds,) for more info see
> When a server is down only keys that hashed to that specific server is
> redistributed to other servers in the pool, other keys aren't affected
> as long as the failed server is kept in the pool. The order in which
> Memcache::addServer() is called and its weight affects the selection
> process, removing or changing the weight of a single server might well
> result in all keys hashing to different servers.
> The ini setting "memcache.allow_failover" controls whether a failed
> servers keys will be redistributed to the other servers or if requests
> for those key will fail immediately.
> If you have many servers the loss of one won't affect performance much
> and failover might result in stale data (if the failed server goes up
> and down before the redistributed keys have expired); however if you
> have fewer servers the need for failover is greater as the loss of one
> would affect the performance much more.
> Evert|Rooftop wrote:
>> Dear List,
>> One of our servers went down and it was marked by the other servers as
>> 'invalid', so it won't use it anymore..
>> However, it's back up now.. will memcache (PHP PECL) automatically retry
>> after a while or should apache be started on all those machines..
>> It also made me wonder about something else, when a server is down..
>> will the hash thats used to determine the target server be adjusted to
>> just use the other servers? Or will the hashes that would have targeted
>> the server thats down be re-distributed?
More information about the memcached