Search code examples
soadistributed-caching

caching and load-balancing approaches


Lets say I have one WCF service that is running on one server.

Now we introduced some caching on the wcf service for performance reason.

Now if I want to do some load balancing .... is there some existing solution that will allow my cache to also be synched when it is living on different servers ???

How do we deal with these sort of issues?

Maybe a solution is to create a seperate CachingService that will be hosted on another server ... but then again if I want to load balance that service ... I'd need to somehow sync those cache that resides on different machines ...

Or maybe it doesn't event makes sense to load-balance the caching servers but only your wcf services???


Solution

  • Yes, there are many solutions/product that (usually) sync cache between servers (memcached, ehcache and more). I personally found that in case of closely located servers referenced cache performs better. That is cache where (possibly multiple) cache servers share the load and store objects on first "requested from" basis and then share references to the objects between all cache servers.