0

When a user logs in to application I'm loading all his data from the database to the distributed cache.

This means that unless there is a problem with the cache, I'm never going to select data from database again until the user logs out.

Is this wise? Can appfabric cache provide me the same or better performance as an SQL Server Database?

It would give me thousands of requests per day and also the requests will happen very fast one after the other.

SimpleDesign
  • 871
  • 6
  • 10

2 Answers2

0

I worked on a site that had 13 million page views a month (maybe not that much compared to some other sites) and we used AppFabric. We were able to handle 35x spikes when our site was covered by various TV news stations.

When AppFabric wasn't working SQL would die after an hour or two.

From my experience it will handle your traffic. Set up a cluster and just keep adding nodes if it gets overwhelmed.

ryan1234
  • 7,237
  • 6
  • 25
  • 36
0

Any cache is going to provide you with much better performance than a database.

You could use the appfabric session state provider and store your data in a session variable.

You could do the same thing with redis (which is a better solution IMHO than appfabric - I have used both extensively)

If you are not running a web farm / multiple app's accessing the cache you could even consider using the .net 4 ObjectCache - which would just be using memory instead of the extra overhead of a dedicated cache service, and still get features such as expiry etc.

Scaling Rule #1 - Cache everything!

tonynero
  • 46
  • 3