为什么Memcached不能跨节点同步 [英] Why memcached does not synchronize across nodes

查看:16
本文介绍了为什么Memcached不能跨节点同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在内存缓存概述中here

上面写着:

Memcached servers are generally unaware of each other. There is no crosstalk, no syncronization, no broadcasting. The lack of interconnections means adding more servers will usually add more capacity as you expect. There might be exceptions to this rule, but they are exceptions and carefully regarded. 
我在想,在不跨集群中的节点进行同步的情况下,它如何成为分布式系统?如果我从我的程序写入节点1上的缓存,并且我的下一个请求到达节点2,那么我正在从过时的缓存中读取。

推荐答案

内存缓存不提供与密钥分片、哈希、复制、HA、冗余或故障转移相关的功能。

正是客户端库利用某种类型的哈希算法在Memcached服务器群集中分发密钥,但该功能完全独立于Memcached本身。

根据您的目标语言,有很多客户端库,只需选择一个提供您所需的散列功能即可:
http://code.google.com/p/memcached/wiki/Clients

这篇关于为什么Memcached不能跨节点同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆