This is not a problem, this is the way that memcache is designed.

When your formerly failed memcached server comes back up and you
request the item from it, it will miss. Ideally this is when you go
recalculate whatever the value is and you then set it in the 'proper'
cache.

Also, consider that when your 2nd memcached server is down, you'll put
into the 1st server on its first miss, but any subsequent requests
(until the 2nd comes back up) are getting served appropriately by the
first.

After the second server comes back up, over time the 'duplicate' on
the first server will be purged from memory because it will end up as
Least-Recently-Used data.

- Nelz

On Fri, Mar 4, 2011 at 03:46, Evil Boy 4 Life <[email protected]> wrote:
> Hi,
> I use the .net clients and 2 servers at 2 different machines.
> When one of the memcached servers is down, I try to set an item to the
> cache (According the hashing algorithm of the client, this item should
> stored the inactive server!) and this item get stored at the active
> server.
> After I set the item, the second server get back to work. Now if I'll
> try to get this item I won't succeed, because the client will searche
> the item at the second server (According the hashing algorithm).
>
> What can i do to solve this problem???
> (To set the item again at the second server isn't a solution, because
> I don't want to store any item at 2 servers)

Reply via email to