Failover using Java client API

a a akannan13 at
Wed Jun 15 11:50:55 PDT 2005

I'm using the java client api (1.2.1) with 2 memcache
  //set up sock io pool
SockIOPool pool = SockIOPool.getInstance();
pool.setServers(new String[]

//connect , set & get
MemCachedClient mc = new MemCachedClient();
mc.set("key999","Sample value");
System.out.println( mc.get("key999"));

My question is, if one of the servers in my pool is
down and the hashing algorithm selects that server for
the given key it doesn't seem to be failing over to
the next server. I took a look at the code and it does
seem to try twice by rehashing but the hash yields the
same bucket.
What am I missing here? Is this expected behavior?


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the memcached mailing list