I configured two memcached server with spymemcached localhost:11211,
192.168.1.101:11211and i run a simple loop of add and get.
when both servers are up everything is file, but if one of them is down spymemcached still selects it and of course fails on timeout exceptions.
I'd say about 20-40 percent of the times the non active node is selected for operation.
debugging net.spy.memcached.MemcachedConnection#addOperation(String ,Operation) I can see that the iteration over locator.getSequence(key) does not always find an active node when the primary is not active. when in fact the other one is active.
It does not happen
with ArrayModNodeLocator and the distribution looks ok to me.
can someone explain what are the consequences of using
ArrayModNodeLocator in contrast to KetamaNodeLocator , I understand how they work but the fact that KetamaNodeLocator is the default makes me think it has a meaning.
Thank you.