在Google应用引擎中,memcached是否跨服务器共享? [英] Does memcached share across servers in google app engine?

查看:143
本文介绍了在Google应用引擎中,memcached是否跨服务器共享?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在memcached网站上,它说memcached是一个分布式内存缓存。这意味着它可以在多个服务器上运行并保持某种一致性。当我在谷歌应用程序引擎中提出请求时,相同实体组中的请求很可能会由同一服务器提供服务。



我的问题是有两台服务器为我的请求提供服务,这两台服务器的memcached视图是否相同?也就是说,我在一台服务器上的memcached中放入的内容反映在另一台服务器的memcached实例中,还是这两个完全独立的memcached实例(每台服务器一个)?



<具体来说,我希望每个服务器都实际运行它自己的memcached实例(在其他memcached实例中不复制)。如果是这种情况,这两个memcached实例更新彼此关于他们所做的更改,是否有办法禁用这个?



如果这些问题很愚蠢,我很抱歉,因为我刚开始阅读它,但这些都是我遇到的最初问题。谢谢。

解决方案

App Engine并不真正使用memcached,而是一个API兼容的重新实现(主要由相同的人,我相信 - 在他的20%时间里; - )。

缓存值可能随时消失(通过显式过期,一台服务器崩溃或由于内存不足,在这种情况下,它们会以最近最少使用的顺序驱逐等),但如果它们没有消失,它们在被不同服务器查看时是一致的。


On the memcached website it says that memcached is a distributed memory cache. It implies that it can run across multiple servers and maintain some sort of consistency. When I make a request in google app engine, there is a high probability that request in the same entity group will be serviced by the same server.

My question is, say there were two servers servicing my request, is the view of memcached from these two servers the same? That is, do things I put in memcached in one server reflected in the memcached instance for the other server, or are these two completely separate memcached instances (one for each server)?

Specifically, I want each server to actually run its own instance of memcached (no replication in other memcached instances). If it is the case that these two memcached instances update one another concerning changes made to them, is there a way to disable this?

I apologize if these questions are stupid, as I just started reading about it, but these are initial questions I have run into. Thanks.

解决方案

App Engine does not really use memcached, but rather an API-compatible reimplementation (chiefly by the same guy, I believe -- in his "20% time";-).

Cached values may disappear at any time (via explicit expiration, a crash in one server, or due to memory scarcity in which case they're evicted in least-recently-used order, etc), but if they don't disappear they are consistent when viewed by different servers.

这篇关于在Google应用引擎中,memcached是否跨服务器共享?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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