扩展ASP.NET数据缓存以在Web场之间共享

时间:2023-01-07 16:48:33

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.

我有一个ASP.NET应用程序,它广泛使用ASP.NET缓存API来缓存常用数据。另外,我使用基于轮询的sql缓存依赖来跟踪到期。

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.

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

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?

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

Any other solutions?

还有其他方法吗?

3 个解决方案

#1


8  

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

你看过Windows Server AppFabric(以前的Velocity)吗?

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

#2


2  

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

    使用此处描述的方法在Web场中同步数据 - http://www.eggheadcafe.com/articles/20030420.asp

  2. Use distributed caching approach

    使用分布式缓存方法

  3. Use enterprise library cache.

    使用企业库缓存。

#3


2  

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

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

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.

Windows Server AppFabric提供分布式内存应用程序缓存平台,用于开发可伸缩,可用和高性能的应用程序。 AppFabric将内存融合到多台计算机上,为应用程序提供单一的统一缓存视图。应用程序可以存储任何可序列化的CLR对象,而无需担心对象的存储位置。只需按需添加更多计算机即可实现可扩展性。缓存还允许跨群集存储数据副本,从而保护数据免受故障的影响。它作为通过网络访问的服务运行。此外,Windows Server AppFabric提供与ASP.NET的无缝集成,使ASP.NET会话对象能够存储在分布式缓存中,而无需写入数据库。这样可以提高ASP.NET应用程序的性能和可伸缩性。

#1


8  

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

你看过Windows Server AppFabric(以前的Velocity)吗?

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

#2


2  

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

    使用此处描述的方法在Web场中同步数据 - http://www.eggheadcafe.com/articles/20030420.asp

  2. Use distributed caching approach

    使用分布式缓存方法

  3. Use enterprise library cache.

    使用企业库缓存。

#3


2  

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

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

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.

Windows Server AppFabric提供分布式内存应用程序缓存平台,用于开发可伸缩,可用和高性能的应用程序。 AppFabric将内存融合到多台计算机上,为应用程序提供单一的统一缓存视图。应用程序可以存储任何可序列化的CLR对象,而无需担心对象的存储位置。只需按需添加更多计算机即可实现可扩展性。缓存还允许跨群集存储数据副本,从而保护数据免受故障的影响。它作为通过网络访问的服务运行。此外,Windows Server AppFabric提供与ASP.NET的无缝集成,使ASP.NET会话对象能够存储在分布式缓存中,而无需写入数据库。这样可以提高ASP.NET应用程序的性能和可伸缩性。