Spymemcached, configure to switch to another resource

I have a clusterase host cluster, and I also have a set of moxi processes running in different blocks, all configured to communicate with this cluster.

My client uses spymemcached, and I'm trying to configure MemcachedClient so that it knows about all available moxi processes. That way, if one of these processes dies, I want spymemcached to use another moxi and keep sending data to the cluster.

Ideally, all this should be done without losing information about the queues.

I play with two moxi processes, but can't get it to do what I want.

I looked at http://groups.google.com/group/spymemcached/browse_thread/thread/d33ca15c0a928d37# and http://groups.google.com/group/spymemcached/browse_thread/thread/f7cc37fc509b70a6/cbb967e824a0ab04?hl=g&q&&l&q&q = redistribute # cbb967e824a0ab04 no luck.

Can someone tell me if this is possible in spymemcached? and if so, how to configure it?

I play with various configurations of ConnectionFactoryBuilder.

ConnectionFactoryBuilder builder = new ConnectionFactoryBuilder(); builder.setFailureMode(FailureMode.Redistribute); builder.setProtocol(Protocol.BINARY); builder.setLocatorType(Locator.CONSISTENT); builder.setMaxReconnectDelay(1); builder.setTimeoutExceptionThreshold(2); ConnectionFactory cf = builder.build(); 
+4
source share
1 answer

I'm not sure, but can you specify multiple moxi servers in spymemcached configurations? As far as I know, moxi supports the memcached protocol, and spymemcached allows you to talk to multiple memcached servers. This means that spymemcached will select one of the moxi servers based on a sequential hash algorithm, which doesn’t really matter, because in any case, the memcached server will be selected by the moxi process. If one of the moxi processes dies, spymemcached will automatically switch to another moxi process.

0
source

Source: https://habr.com/ru/post/1339198/


All Articles