扩展 ASP.NET 数据缓存以在网络场中共享

发布于 2024-08-09 06:27:48 字数 242 浏览 4 评论 0原文

我有一个 ASP.NET 应用程序,它广泛使用 ASP.NET 缓存 API 来缓存常用数据。此外,我使用基于轮询的 SQL 缓存依赖项来跟踪过期情况。

当前设计的缺点是,在网络场环境中,每个网络服务器都有自己的数据缓存,并且不跨服务器共享。

有没有一种方法可以简单地迁移代码以在多个服务器之间共享数据缓存?

我想过使用 memcached 但是这不适用于 sql 缓存依赖项,对吧?

还有其他解决方案吗?

I have an ASP.NET application that makes extensive use of ASP.NET cache API for caching commonly-used data. In addition, I am using polling-based sql cache dependency to track expiration.

The drawback of the current design is that, in the web farm environment, each web server has its own data cache that is not shared across servers.

Is there a way I can simply migrate the code to share data cache across multiple servers?

I've thought of using memcached however that would not work with sql cache dependency, right?

Any other solutions?

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

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

发布评论

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

评论(3

泡沫很甜 2024-08-16 06:27:48

您是否看过 Windows Server AppFabric(以前称为 Velocity)。

http://blogs.msdn.com/velocity/

Have you looked at Windows Server AppFabric (Formerly Velocity).

http://blogs.msdn.com/velocity/

樱娆 2024-08-16 06:27:48

您可以使用以下选项 -

  1. 使用此处描述的方法跨网络场同步数据 -
    http://www.eggheadcafe.com/articles/20030420.asp

  2. 使用分布式缓存方法

  3. 使用企业库缓存。

You could use following options -

  1. Use the approach described here for synchronizing the data across web farms -
    http://www.eggheadcafe.com/articles/20030420.asp

  2. Use distributed caching approach

  3. Use enterprise library cache.

甜嗑 2024-08-16 06:27:48

在我看来 Windows Server AppFabric 正是您正在寻找的。 (又名“速度”)。来自介绍性文档

Windows Server AppFabric 提供
分布式内存应用程序
开发缓存平台
可扩展、可用且
高性能应用程序。
AppFabric 融合多个内存
计算机给出一个统一的
将视图缓存到应用程序。
应用程序可以存储任何
可序列化的 CLR 对象,无需
担心物体到达哪里
存储。可扩展性可以通过以下方式实现
只需添加更多计算机即可
要求。缓存还允许
跨网络存储的数据副本
集群,从而保护数据免受
失败。它作为服务运行
通过网络访问。在
此外,Windows Server AppFabric
提供无缝集成
启用 ASP.NET 会话的 ASP.NET
要存储的对象
分布式缓存,无需
写入数据库。这增加了
性能和可扩展性
ASP.NET 应用程序。

It seems to me that Windows Server AppFabric is exactly what you are looking for. (AKA "Velocity"). From the introductory documentation:

Windows Server AppFabric provides a
distributed in-memory application
cache platform for developing
scalable, available, and
high-performance applications.
AppFabric fuses memory across multiple
computers to give a single unified
cache view to applications.
Applications can store any
serializable CLR object without
worrying about where the object gets
stored. Scalability can be achieved by
simply adding more computers on
demand. The cache also allows for
copies of data to be stored across the
cluster, thus protecting data against
failures. It runs as a service
accessed over the network. In
addition, Windows Server AppFabric
provides seamless integration with
ASP.NET that enables ASP.NET session
objects to be stored in the
distributed cache without having to
write to databases. This increases
both the performance and scalability
of ASP.NET applications.

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