Question

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?

Was it helpful?

Solution

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

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

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top