jsxiao / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

option to disable failover. #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of the product are you using? On what operating system?

Spymemcached version no 2.2
OS : Ubuntu 8.04

Tell me more...

when one of initialized servers is down, is there an option **not** to
fallback on fail over and return a null. So that till the cache server is
up, the load would be on DB. This will ensure that we would never get a
stale information. 

This is needed, considering following scenario.

I have Two memcahe Servers Server1 and Server2. I have (Key1,Object1) which
got cached on Server1. Now if suppose due to some reason Server1 goes down,
the SpyMemcahedClient tries connect to Server2, and we end up Caching
(Key1,Object1) on Server2.

Now after sometime Server1 comes up, and SpyMemcahedClient now conects to
Server1. now Suppose a new value is set for Key1 say (Key1,Object2). now if
again Server1 goes down, SpyMemcahedClient while doing a get for Key1 will
try connecting to Server2, and end up returning stale content Object1.

--
Regards
Surya Chaitanya Tamada

Original issue reported on code.google.com by chaitany...@gmail.com on 22 Jan 2009 at 1:12

GoogleCodeExporter commented 8 years ago
This is good, and I've just been brainstorming on making such a behavior more
configurable since I seem to have people asking for different mechanisms.

Original comment by dsalli...@gmail.com on 26 Jan 2009 at 5:41

GoogleCodeExporter commented 8 years ago
Please see the new failure modes.  I think they cover what you're looking to do.

http://bleu.west.spy.net/~dustin/projects/memcached/apidocs/net/spy/memcached/Fa
ilureMode.html

Original comment by dsalli...@gmail.com on 17 Feb 2009 at 4:40