douwen7331 2013-07-22 08:47
浏览 39

Brutis和memcached FailOver

I'm doing some experiments to determine the attitude of Memcached in case of different kind of errors (crash of Memcached node, high latency...). In the case of the crash, the failOver is not what i expected.

For me, when a memcached client crash and with some options activated, the memcached server should after a time stop using the fallen node and use only the remainings nodes.

At the begin of the experiment i use two memcached client and one server with a request generator, i'm storing 10000 request in them, and the request are equally distributed between the clients nodes.

Then i inject the crash on a node and the remaining node will not get the requests from the dead node. I want the new set and get to be done in the remaining node.

The request generator is brutis, and it does one set and nine get every time: set goes from 1 to 10000 and same for get, but set are slower because of the previous repartition.

The option used is (OPT_REMOVE_FAILED_SERVERS, true).

I'm using libmemcached-1.0.16, memcached-1.4.15, and the php version of memcached is 2.1.0.

How could i obtain that once evicted, the hash function send only to living nodes ?

Thanks

  • 写回答

1条回答 默认 最新

  • duancan1900 2013-12-14 14:23
    关注

    You have to use the CONSISTENT hashing: $memcache->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT);

    I'm currently testing this, against php5-memcached:2.0.1 and libmemcached:1.0.8, but I have many issues testing the failover options.

    But, as a start, when setting the consistent hashing, after two hits on a dead server, all keys of the dead server are distributed on other servers.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog