Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET cache solution for load-balancing system

We are developing an ASP.NET web application on load-balancing system. Now we are facing several problems with current cache system:

  1. It is not synchronized between web servers. There are some solutions such as SQL Cache Dependency or implementing a separated Cache Service:
    • SQL Cache Dependency: it is stable but quite slow for our app
    • Separated Cache Service: it is faster but not stable because we will have bottle-neck problem. Do you have any solution for this issue?
  2. When we upgrade the Database system to Clustered servers, what is the stable solution for Cache system?

Thanks.

like image 937
Hoa Tran Avatar asked Mar 17 '12 11:03

Hoa Tran


People also ask

Can load balancer do caching?

Turns out that GCP's load balancer can easily cache common requests, and move them to Google Cloud CDN to reduce latency, as well as reduce the number of requests needing to be served by the instance. As long as the request is cached, it will be served directly at Google's network edge.

How use Redis cache in ASP.NET Core?

You can configure an Azure Redis Cache for an Azure-hosted ASP.NET Core app, and use an Azure Redis Cache for local development. An app configures the cache implementation using a RedisCache instance (AddStackExchangeRedisCache). Create an Azure Cache for Redis. Copy the Primary connection string (StackExchange.


2 Answers

Have seen NCache. It is free(the Express version. For Professional and Enterprise just Developer Machine is free ) and asp.net compatible.

NCache is an extremely fast and scalable in-memory distributed cache that caches application data . NCache also stores ASP.NET Session State Sessions in web farms. Works grate with Loadbalancer and simple to configure.

like image 194
patricgh Avatar answered Sep 23 '22 13:09

patricgh


We use memcached and have had no problems with it. Very reliable and pretty simple to implement. What do you mean you'll have a bottle-neck problem with a third party caching solution? We've been running it for about a year or so now and have had great experience with it.

Edit: Our environment is load balanced across 3 web servers and 2 SQL servers.

The other reason I would prefer third party is because you can cache anything in it, objects, data, etc.

Setup: http://syntaxhelp.com/ASP.NET/Cache/memcache References: http://code.google.com/p/memcached/wiki/NewStart

like image 43
Robert Avatar answered Sep 23 '22 13:09

Robert