Migrating Memcached client from Memcached-Java-Client to Xmemcached

ε祈祈猫儿з 提交于 2019-12-06 10:18:52

The way i understand you will have the same problem as in xmemcached with spymemcached. As i noted before here- http://bugs.membase.org/browse/MB-1484, the consistent hashing you are using now it a weighted consistent hashing as opposed to other 2, and that's why you are missing some of the keys.

It seems like my old danga client is incompatible with the Xmemcached/Spymemcached clients due to a simple reason: The danga client hashes the host:port strings while the later clients hash the InetSocketAddress which is effectively equals to host/IP:port.

Due to this fact I am unable to remain compatible when migrating to a newer client. Well, actually both Xmemcached, and Spymemcached clients are somewhat extensible and do allow some support in making this happen, but doing this will be too 'hacky' to my preferences.

What I decided to do is to migrate my code to use one of Xmemcached/Spymemcached according to benchmarks results. Both are compatible with moxi's hashing algorithm. I may eventually end up using a client side moxi only - depending on the overhead it will add. I like this option best since it makes the application configuration much simpler.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!