AppFabric缓存服务器和Web应用程序位于同一台物理机上

发布于 2024-12-16 19:09:56 字数 1170 浏览 4 评论 0原文

我正在考虑在我们的一个项目中使用 AppFabric 缓存功能。 我们需要分布式缓存功能,AppFabric 似乎是一个很好的解决方案。 不过,我有几个问题希望能在这里得到解答。

我们正在考虑将 AppFabric 缓存服务器托管在安装 Web 应用程序的同一台计算机上。我在 MSDN 文章中发现 AppFabric 应该安装在专用计算机上。还值得注意的是,AppFabric 可以与应用程序本身安装在同一台计算机上,但应考虑一些问题(引自文章):

Windows Server AppFabric 缓存主机应专用于缓存服务,这意味着这些服务器不能同时用作应用程序、Web 或数据库服务器。可以在集群中使用非专用缓存服务器,但不支持这种情况。尽管有此策略,如果您决定使用非专用缓存主机,请确保正确估计和测试每个缓存主机的配置,以便为计算机上的缓存服务和所有其他服务提供足够的内存和网络资源。另请注意,其他服务的处理器和网络利用率峰值将对缓存集群的性能和稳定性产生负面影响。

以下是本文的链接:文章 #1

现在,这听起来足够合理,我认为限制 AppFabric 缓存可以使用的 RAM 量就足够了。但是,阅读 MSDN 上的另一篇文章我发现了这一点:

对于物理机和虚拟机,您应该记下使用缓存的应用程序或 Web 服务器的缓存集群的位置。如果它们位于不同的数据中心,请确保这些数据中心之间的延迟不会对您的性能产​​生负面影响。在此阶段,您可能会倾向于使用应用程序或 Web 服务器作为缓存服务器。尽管可能,但这不受支持。首先,这些计算机上的 IIS 等服务的任何资源使用高峰都可能影响缓存集群。 其次,缓存服务假定它位于专用服务器上,并且可能使用比您指定的更多的内存。

以下是本文的链接:Article #2

如果我正确理解上面的陈述,这意味着尽管我对 AppFabric 进行了配置设置,但它仍需要尽可能多的时间内存如其所愿吗?这真的是真的吗?有没有人对应用程序和 AppFabric 位于同一台计算机上的配置有一些经验?

I am considering using AppFabric caching feature for one of our projects.
We have a need for distributed caching feature and it seems AppFabric is a good solution.
However, I have a few questions which I hope will be answered here.

We are considering to host AppFabric Cache server on the same machine where our web application is installed. I have found on MSDN article stating that AppFabric should be installed on a dedicated machine. It is also noted there that AppFabric can be installed on the same machine as application itself but some issues should be considered (quote from article):

Windows Server AppFabric cache hosts should be dedicated to the caching service, which means that those servers are not also used as application, web, or database servers. It is possible to use non-dedicated cache servers in a cluster, but this scenario is not supported. Despite this policy, if you decide to use non-dedicated cache hosts, make sure to properly estimate and test the configuration for each cache host to allow enough memory and network resources for both the caching service and all other services on the machines. Also understand that spikes in processor and network utilization by other services will negatively impact the performance and stability of the cache cluster.

Here is a link to this article: Article #1

Now, this sounds reasonable enough, I was thinking that limiting amount of RAM AppFabric cache can use would be enough. But, reading another article on MSDN I have found this:

For both physical and virtual machines, you should note the location of the cache cluster to the application or web servers that use the cache. If they are in separate data centers, make sure that the latency between those datacenters will not negatively affect your performance. At this stage it might be tempting to use your application or web servers for your cache servers. Although possible, this is not supported. First, any resource usage spikes by services such as IIS on those machines could impact the cache cluster. Second, the caching service assumes that it is on a dedicated server and can potentially use more much more memory than you specify.

Here is a link to this article: Article #2

If I understand correctly statement above, this means that despite my config settings for AppFabric, it will take as much RAM as it wants? Can this be really true? Has anyone some experience with configuration where application and AppFabric are located on the same machine?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终陌 2024-12-23 19:09:56

为了在 appfabirc 上分享我的故事,我们开始在共享服务器上使用 appfabric 缓存,但最终由于以下问题不得不将其删除...

  1. 我们试图在其中保存对象,并且您必须这样做序列化整个图并将其发送到服务器,在高需求场景中,不确定它比从数据库本身提取效率高多少。另外,您可以告别任何委托或事件接线,或对象中的异步操作。

  2. 缓存服务本身会间歇性地抛出错误,表示其不可用,然后您必须使用以下命令检查它的运行状况电源外壳。另外,只要你的盒子使用超过 90% 的 RAM,它就会停止工作。

  3. 即使盒子上有一点内存压力,它也会积极尝试从缓存中逐出项目,并且总是占用内存10-20% 的 cpu ......

,我认为 MS 的建议是正确的,它需要拥有自己的专用集群,但每个应用程序都有自己独特的需求,您应该根据部署环境中的参数对其进行评估。

To share my story on appfabirc, we started using appfabric caching on a shared server, but eventually had to take it out because of the following issues...

  1. we were trying to save objects in it, and do that you have to serialize the whole graph and send it to server, in a high demand scenario, not sure how much more efficient it is than puling from db itself. Plus you can say goodbye to any any delegates or events wireups, or async operations in your objects..

  2. The caching service itself would intermittently throw errors saying its not avaialable and then you will have to go and check the health of it using powershell. Also anytime your box is using more than 90% of RAM, it would stop working..

  3. Even if there is a little bit of memory pressure on the box, it aggressively tries to evict items from the cache and was always taking around 10-20% of cpu for that....

to sum it up, i think MS recommendation is correct that it needs to have its own dedicated cluster, but then again every application has its own unique needs and you should evaulate it against parameters in your deployment environment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文