简体   繁体   English

云环境中的.Net应用程序缓存

[英].Net Application Cache in Cloud Environment

I'm using the Enterprise Application Block and my application is hosted in a Cloud Environment. 我正在使用企业应用程序块,并且我的应用程序托管在云环境中。 I was wondering what else I need to do with my implementation to make it as efficient as possible. 我想知道我还需要对我的实现做些什么以使其尽可能高效。

In the cloud, where everything is naturally distributed, you will definitely want to look into having a distributed cache solution. 在一切都自然分布的云中,您肯定会希望拥有分布式缓存解决方案。

In-memory application cache will not be able to handle distributed environment very well. 内存中的应用程序缓存将无法很好地处理分布式环境。

Imagine this scenario: 想象一下这种情况:

  • request 1 comes in 请求1进来
  • server 1 is processing the request 服务器1正在处理请求
  • in memory cache on server 1 is primed and filled in with the popular data 服务器1上的内存缓存中的数据已准备就绪并填充了流行数据
  • request 2 comes in, asking for the same data 请求2进入,要求相同的数据
  • server 2 is processing the request 服务器2正在处理请求
  • in memory cache on server 2 is yet primed again and filled in with the popular data 服务器2上的内存高速缓存中的数据仍被重新填充并填充了流行数据

as you can see here, we're getting 2 misses to prime the cache. 如您在此处看到的,我们有2次未命中以准备缓存。 You will need a dedicated distributed cache server where it'll service all the cache requests. 您将需要一个专用的分布式缓存服务器,该服务器将为所有缓存请求提供服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM