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 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据