Last post Apr 11, 2012 10:17 AM by sirdneo
Apr 11, 2012 04:24 AM|lajapathy.arun|LINK
Consider the scenario, if i am having 3 server, while load balalcing it switches to other server, while on that scenario
the cache will not avaialble in the switched server.
Whether the server transmit the cache data also while switching operation?
Apr 11, 2012 09:04 AM|BrockAllen|LINK
Depends what sort of cache you use. If you use only an in-memory cache like the built in HttpContext.Cache then it won't happen and you will be faced with cache coherency problems. But if you use a distributed cache (like Windows Server AppFabric or NCache)
then any web server you execute on will access the same shared cache state.
Apr 11, 2012 09:05 AM|Renjith|LINK
Apr 11, 2012 10:17 AM|sirdneo|LINK
Asp.Net's builtin cache is stored in Server's memory and whenever your server is switched, then your cache objects will be blank on new server.
To over come this problem you need to use third party caching systems which creates the cache in such a way that cache is outside the server and server switching does not result in blank cache.
I think you can use Velocity to solve your problem. Hereare the details which I copied from some site:-
Velocity is a distributed in-memory application cache platform for developing scalable, available, and high-performance applications. Velocity 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. “Velocity” also allows for copies of data to be stored across the cluster, thus protecting data against
failures. Velocity can be configured to run as a service accessed over the network or can be run embedded with the distributed application. Velocity includes an ASP.NET session provider object that enables ASP.NET session objects to be stored in the distributed
cache without having to write to databases.