AppFabric - 在群集上使用DataCache.Put(String,Object,Generic IEnumerable) [英] AppFabric - Using DataCache.Put(String, Object, Generic IEnumerable) on clusters

查看:70
本文介绍了AppFabric - 在群集上使用DataCache.Put(String,Object,Generic IEnumerable)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。

我们正在使用
DataCache.Put(String,Object,Generic IEnumerable)
。我们使用区域名称,以便能够通过标签检索对象。我们需要使用Tags,但我们也需要集群。因此,我们关注
"功能与权限之间的权衡使用区域时的可扩展性"

We are using DataCache.Put(String, Object, Generic IEnumerable) when creating or updating a cache object. We were using region names in order to be able to retrieve objects by tags. We need to use Tags, but we also need clusters. So, we were concerned about the "trade-off between functionality and scalability" when using regions.

然后,我发现了这个
thread
说明系统区域已分发到所有集群。这样对吗?我找不到任何相关的文档。

Then, I've found this thread stating that system regions are distributed to all the cluster. Is it right? I can't find any documentation on this.

推荐答案

是的,系统区域分布在集群中但是...

Yes, system regions are distributed across the cluster but...

在你提到的线程中考虑你必须为每个系统区域调用GetObjectsByTag(默认情况下有1K系统区域)。

In the thread you mentioned consider the fact that you would have to call GetObjectsByTag for each system region (by default there are 1K system regions).

这意味着你必须进行1024次远程调用才能确保按标签获得所有对象。 你最好坐下来,这需要一段时间。

That means you would have to make 1024 remote calls to be sure you got all the objects by tag.  You better sit down, this will take a while.

我经常告诉别人 - 缓存不是数据库。 跨缓存节点执行分布式查询会产生糟糕的性能,我认为您需要良好的性能 - 这就是您缓存的原因。

I often tell people - The cache is not a database.  Doing distributed queries across cache nodes will have horrible performance and I assume you want good performance - that is why you are caching.

如果您选择区域,则可以使用此标记功能,因为所有标记的对象都位于同一服务器上的同一区域,只需要一次远程调用即可获取它们。

If you opt for regions, you can use this tagging capability and because all the tagged objects live in the same region on the same server you need only 1 remote call to fetch them.

如果你不能将所有对象存储在一个区域中,因为它会很大或者会使群集失衡,那么你应该只为这个查询使用数据库。

If you cannot store all the objects in one region because it would be to large or would unbalance the cluster then you should just use a database for this query instead.


这篇关于AppFabric - 在群集上使用DataCache.Put(String,Object,Generic IEnumerable)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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