Skip to main content

How does AppFabric cache calculates the values for RequestCount, ReadRequestCount, WriteRequestCount and MissCount?

When I started to use the Get-CacheStatistics cmdlet to monitor caching activities more intensivley I was often confused. Here an example:


Should not be ReadCount+WriteCount = RequestCount? Why is WriteRequestCount increasing +2 although I just send one put request?

By talking to Microsoft support I figured out how AppFabric cache calculates its numbers (Thanks to Gayathri from Distributed Service Team). Number calculation behavior depends on your configuration, high availability and local cache have a major impact on it.
ActivityRequestCount ReadRequestCount WriteRequestCount MissCount 
DataCacheFactory is initialized and Named Cache is up +1---
Put item, not yet in local and server cache+1-+1 (+2 with HA)+1
Get item from local cache----
Get item from server cache, local cache has expired+1+1--
Get item, local and server cache has expired+1+1-+1
I hope this is helpful for you when you are analyzing the caching behavior for your application.

Popular posts from this blog

How to get started with Windows Server AppFabric easily

In my opinion it is really hard to get started with Windows Server AppFabric. There is good material, but it is shuffled around in different sources. A good intro can you find here: this all-in-one intro by Scott Hanslmann  this caching intro by Wade Wegener  Additional helpful resources are Microsoft's Introduction Part 1 and Microsoft's Introduction Part 2 by Jon Flanders  Pluralsight's Hosting Fundamentals   Pluralsight's Caching Introduction   Microsoft's Caching Documentation   Good books are Microsoft Windows Server AppFabric Cookbook   and Pro Windows Server: AppFabric Please also watch out for software updates, currently there is CU 4 . To keep yourself updated subscribe to Distributed Services News Feed . Updated my list on 11.03.2014 with one more Download the Windows Server AppFabric Samples

Clean up AppFabric Dashboard Part 2: Duplicate collection entry in Web.config

In Part one I have already described how to remove phantom apps here on more supplement. These phantom apps could also remain in the AppFabric Monitoring db: Just delete no longer needed entries in this table. Duplicate collection entry When you receive this kind of issue, like "[...] Cannot add duplicate collection entry [...]" you have defined the a configuration section twice in two different Web.config files in different places in your file system. Clear One easy solution is to use a clear statement . Searching for the inherited element There is a post in Microsoft's documentation which is explaining how to do it. Visual Studio in debug mode When you are working with Visual Studio in debug mode, which means you are just pressing F5 to run it on your local IIS instead of publishing it to a web server, you should keep in mind that e.g. your obj folder might contain more copies of your Web.config file. This could lead into this duplicate collectio...

Two annoying issues in Visual Studio regarding XSDs and WCF should be fixed immediately

In my daily work I am always stumbling on two annoying features in Visual Studio, and I think it could be improved easily. Here is what I am complaining about. WCF Test Client WCF Test Client might be a nice tiny tool for small WCF tests, especially when you are testing smaller scenarios or when you are starting to learn how to implement web services with .NET. But it can be very annoying when you are working on more advanced stuff and your are testing with your local IIS. WCF Test Client always(!) starts automatically when you press F5 for debugging and your opened .svc.cs file has the focus: When I have configured local IIS is the target for debugging, then I expect my application will start with local IIS and not with WCF Test Client. Always. Here is my first urgent request: Please give me an option to disable WCF Test Client completely! Update 03.03.2014: Workaround for WCF Test Client Issue Select project file -> Right click -> Properties -> Web -> Sele...