<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ASP NET Cache</title>
	<atom:link href="http://aspnetcache.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://aspnetcache.wordpress.com</link>
	<description>A blog about ASP.NET Cache, its uses and most importantly, its limitations and fixes.</description>
	<lastBuildDate>Thu, 23 Oct 2008 15:00:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='aspnetcache.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ASP NET Cache</title>
		<link>http://aspnetcache.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://aspnetcache.wordpress.com/osd.xml" title="ASP NET Cache" />
	<atom:link rel='hub' href='http://aspnetcache.wordpress.com/?pushpress=hub'/>
		<item>
		<title>ASP NET Cache Limitations</title>
		<link>http://aspnetcache.wordpress.com/2008/10/08/asp-net-cache-limitations/</link>
		<comments>http://aspnetcache.wordpress.com/2008/10/08/asp-net-cache-limitations/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 17:08:37 +0000</pubDate>
		<dc:creator>Paul Jones</dc:creator>
				<category><![CDATA[ASP.NET Limitations]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[Asp.Net Cache]]></category>
		<category><![CDATA[ASP.NET Cache Bottlenecks]]></category>
		<category><![CDATA[ASP.NET Cache Limitations]]></category>
		<category><![CDATA[ASP.NET Cache WEb Gardens]]></category>
		<category><![CDATA[ASP.NET Web Gardens]]></category>
		<category><![CDATA[Cache Synchronization]]></category>
		<category><![CDATA[InProc]]></category>
		<category><![CDATA[InProc Cache]]></category>
		<category><![CDATA[OutProc]]></category>
		<category><![CDATA[OutProc Cache]]></category>
		<category><![CDATA[SQL Cache Dependency]]></category>
		<category><![CDATA[Web Farms]]></category>
		<category><![CDATA[Web Farms in ASP.NET]]></category>
		<category><![CDATA[Web Farms in ASP.NET Cache]]></category>
		<category><![CDATA[Web Gardens]]></category>

		<guid isPermaLink="false">http://aspnetcache.wordpress.com/?p=145</guid>
		<description><![CDATA[Welcome readers! As stated in my last post, I will highlight the various ASP.NET Cache limitations that make it a less than ideal choice for employment in case of web farms. Let’s try and hack out an intro for ASP.NET Cache in light of what we learned in the last post. The words highlighted in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetcache.wordpress.com&amp;blog=4635281&amp;post=145&amp;subd=aspnetcache&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:9pt;font-family:Verdana;">Welcome readers!</span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;">As stated in my last post, I will highlight the various <a>ASP.NET Cache</a> limitations that make it a less than ideal choice for employment in case of web farms.</span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;">Let’s try and hack out an intro for <a>ASP.NET Cache</a> in light of what we learned in the last post. The words highlighted in blue have been explained in my previous piece(s).</span><span id="more-145"></span></p>
<h1><span style="font-size:9pt;font-family:Verdana;">ASP .NET Cache Intro</span><span style="font-size:9pt;font-weight:normal;font-family:Verdana;">:</span></h1>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;">ASP .NET cache is a standalone <span style="color:#3366ff;">in-proc</span> cache for a single web server. In case of <span style="color:#3366ff;">web gardens</span>, it creates separate cache instances, one for each worker process. These cache instances work independently and have no synchronization with each other. When your <span style="color:#3366ff;">web farm</span> grows, SQL server and <span style="color:#3366ff;">SQL dependencies</span> are employed to keep data synchronized across multiple servers.<span> </span></span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal"><span class="CharChar"><span style="font-size:9pt;font-style:normal;font-family:Verdana;">Problems with ASP .NET cache</span></span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Verdana;"><span>1.<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">The Web Garden Configuration (standalone in-proc cache means data redundancy and low availability): </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;">The Web  Garden situation and the problem it generates due to ASP.NET’s in-proc behavior have been described in my previous post. To reiterate, a Web  Garden, in the case of ASP.NET, means multiple independent worker processes having individual instances of cache. If any worker process fails, its cache instance is lost. And, since these cache instances are disjoint, this gives rise to data redundancy and hence data integrity issues.</span></p>
<p class="MsoNormal" style="margin-left:27pt;">
<p class="MsoNormal" style="margin-left:27pt;"><a href="http://aspnetcache.files.wordpress.com/2008/10/fig1.gif"><img class="alignnone size-full wp-image-154" title="fig1" src="http://aspnetcache.files.wordpress.com/2008/10/fig1.gif?w=402&#038;h=276" alt="" width="402" height="276" /></a></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.25in;"><span style="font-size:9pt;font-family:Verdana;">As shown in the diagram above, in a web garden configuration each worker process has its own copy of the same cache. </span></p>
<p class="MsoNormal" style="margin-left:.25in;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">As explained above, there is no synchronization between various worker processes due to which all <a>ASP.NET caches</a> work independently. This gives birth to problems of data duplication and hence data integrity. </span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">Usually worker processes recycle, and as a result wipe out the entire cache which means that ASP.NET caching is not a reliable way of storing data. If adequate backup facility is not provided, this could be a very serious issue for high end applications due to loss of valuable data. Another drawback is that the cache has to be loaded again in its entirety. </span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">When you have an in-process cache, you are sharing your application’s process memory with cache memory, meaning you are always compromising on your caching ability depending on how much memory your application requires. </span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">This is also a single point of failure since the entire application can come to a grinding halt if this server holding unsynchronized in-proc cache goes down. </span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">It also means that if you need some downtime for maintenance reasons that is going to be extremely difficult to achieve.</span></p>
<p class="MsoNormal" style="margin-left:.25in;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.25in;"><span style="font-size:9pt;font-family:Verdana;">These ASP .NET cache drawbacks would be a setback for any major developmental effort making it impracticable to incorporate it into a high performance, mission critical application.</span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Verdana;"><span>2.<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">Does not support direct cache synchronization in <span style="color:#3366ff;">web farms</span></span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;">(No synchronization between caches directly)</span></p>
<p class="MsoNormal" style="margin-left:27pt;"><a href="http://aspnetcache.files.wordpress.com/2008/10/fig2.gif"><img class="alignnone size-full wp-image-159" title="fig2" src="http://aspnetcache.files.wordpress.com/2008/10/fig2.gif?w=347&#038;h=276" alt="" width="347" height="276" /></a></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="text-align:center;" align="center"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;text-align:center;" align="center"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.25in;text-align:center;" align="center"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.25in;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;">As previously listed, a Web Farm is a collection of servers that are connected together using a load balancer. </span></p>
<p class="MsoNormal" style="margin-left:27pt;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:63pt;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">Once again due to its in-process nature ASP .NET cache simply does not recognize multiple servers and the various cache instances that reside on them. Due to this, these caches across different servers remain secluded and unsynchronized resulting in data redundancy and integrity problems.</span></p>
<p class="MsoNormal" style="margin-left:63pt;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">The load balancing mechanism in a web farm is also severely hampered using a stand-alone in-process cache. The load balancer has to send a recurring user request back to the original server where it was serviced for the first time. This creates an unbalanced approach resulting in load being accumulated on certain servers rather than all the servers in a web farm sharing it evenly.</span></p>
<p class="MsoNormal" style="margin-left:63pt;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">Due to the unjust load balancing mentioned above, scalability suffers tremendously. Adding more serves does not make any sense in this situation as it might aggravate the problem. Hence, more users cannot be entertained by the system.</span></p>
<p class="MsoNormal" style="margin-left:.25in;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Verdana;"><span>3.<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">Performance and scalability issues with SQL dependency (SQL Dependency makes your app slow, and non scalable)</span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;"><a href="http://aspnetcache.files.wordpress.com/2008/10/fig3.gif"><img class="alignnone size-full wp-image-163" title="fig3" src="http://aspnetcache.files.wordpress.com/2008/10/fig3.gif?w=398&#038;h=276" alt="" width="398" height="276" /></a></p>
<p class="MsoNormal" style="margin-left:.25in;text-align:center;" align="center"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.25in;text-align:center;" align="center"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="text-align:center;" align="center"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.25in;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.25in;"><span style="font-size:9pt;font-family:Verdana;">Once they started to go into multi-server environments, Microsoft developed the <span style="color:#3366ff;">SQL cache dependency</span> feature that gave the ability of synchronizing <a>ASP.NET cache</a> across multiple web servers through the database. For lower end applications with a couple of web servers it was great, since they could afford to go to the database and fetch data. However, for high performance applications, in addition to dragging performance down, this solution is also non-scalable. </span></p>
<p class="MsoNormal" style="margin-left:.5in;"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">Since SQLCacheDependency resides in the database, it defeats the very purpose of having an in-memory cache. Any update process has to be performed at the database, then the SQLCacheDependency database as well as copied over to all the other cache instances in the web farm. The whole process is painfully slow.</span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">The more servers you add to the web farm, the slower the performance of your application due to the frequent DB I/O operations.</span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">SQL dependency relies on event based notifications. For high transaction applications, they tend to get quite chatty generating high volumes of traffic. This would result in creating network noise and you would see a performance drop. </span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">The real time nature of events could also cause application’s performance to drop significantly as they start queuing up in high transaction environments.</span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;"><!--[if !supportLists]--><span style="font-size:9pt;font-family:Symbol;"><span>·<span style="font-family:&quot;"> </span></span></span><!--[endif]--><span style="font-size:9pt;font-family:Verdana;">One of the biggest drawbacks or limitations that this puts on the application is that if you decide to increase the number of servers in your web farm due to increased load, you just can’t simply start adding more database servers to the configuration to compensate.<span> </span></span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;">In conclusion, <a>ASP.NET Cache</a> is not a scalable solution for more than 2 servers. Its importance however cannot be denied when it comes to smaller configurations, but as far as high transaction multi-server web farms are concerned, one must start looking into other options. These options will be discussed in detail in the <em>Fixes</em> section of this web log.</span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;color:#339966;"> </span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;">Don’t lose contact, you’ll soon find out how to counter all the various limitations, drawbacks and bottlenecks of <a>ASP.NET Cache</a> discussed in this article. In the meantime, you can learn about ASP.NET Cache fixes at <a title="NCache" href="http://www.alachisoft.com/rp.php?dest=/ncache/index.html" target="_blank">www.alachisoft.com</a><br />
</span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Verdana;">Hope to catch you reading at the next post!</span></p>
<p><!-- AddThis Button BEGIN --><br />
<a href="http://www.addthis.com/bookmark.php" target="_blank"><img class="alignright" src="http://s9.addthis.com/button1-bm.gif" border="0" alt="Bookmark and Share" width="125" height="16" /></a><br />
<!-- AddThis Button END --></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetcache.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetcache.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetcache.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetcache.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aspnetcache.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aspnetcache.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aspnetcache.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aspnetcache.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetcache.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetcache.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetcache.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetcache.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetcache.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetcache.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetcache.wordpress.com&amp;blog=4635281&amp;post=145&amp;subd=aspnetcache&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aspnetcache.wordpress.com/2008/10/08/asp-net-cache-limitations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Paul</media:title>
		</media:content>

		<media:content url="http://aspnetcache.files.wordpress.com/2008/10/fig1.gif" medium="image">
			<media:title type="html">fig1</media:title>
		</media:content>

		<media:content url="http://aspnetcache.files.wordpress.com/2008/10/fig2.gif" medium="image">
			<media:title type="html">fig2</media:title>
		</media:content>

		<media:content url="http://aspnetcache.files.wordpress.com/2008/10/fig3.gif" medium="image">
			<media:title type="html">fig3</media:title>
		</media:content>

		<media:content url="http://s9.addthis.com/button1-bm.gif" medium="image">
			<media:title type="html">Bookmark and Share</media:title>
		</media:content>
	</item>
		<item>
		<title>Intro To ASP NET Cache Limitations</title>
		<link>http://aspnetcache.wordpress.com/2008/10/08/intro-to-asp-net-cache-limitations/</link>
		<comments>http://aspnetcache.wordpress.com/2008/10/08/intro-to-asp-net-cache-limitations/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 14:40:19 +0000</pubDate>
		<dc:creator>Paul Jones</dc:creator>
				<category><![CDATA[ASP.NET Limitations]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Asp.Net Cache]]></category>
		<category><![CDATA[ASP.NET Cache Alternatives]]></category>
		<category><![CDATA[ASP.NET Cache Bottlenecks]]></category>
		<category><![CDATA[ASP.NET Cache InProc]]></category>
		<category><![CDATA[ASP.NET Cache Limitations]]></category>
		<category><![CDATA[ASP.NET Cache Synchronization]]></category>
		<category><![CDATA[ASP.NET Cache Web Farm]]></category>
		<category><![CDATA[ASP.NET Cache Worker Process]]></category>
		<category><![CDATA[Caching in ASP.NET]]></category>
		<category><![CDATA[Web Farms in ASP.NET Cache]]></category>
		<category><![CDATA[Web Gardens in ASP.NET Cache]]></category>

		<guid isPermaLink="false">http://aspnetcache.wordpress.com/?p=136</guid>
		<description><![CDATA[Dear readers, Before we immerse ourselves into thoughts of ASP.NET Cache limitations, let&#8217;s explain worker processes, web gardens and web farms in a little more detail so that we can understand the issues of synchronization, speed, reliability and scalability in the context of caching. Doing so would not only help us realize the drawbacks that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetcache.wordpress.com&amp;blog=4635281&amp;post=136&amp;subd=aspnetcache&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dear readers,</p>
<p>Before we immerse ourselves into thoughts of <a>ASP.NET Cache limitations</a>, let&#8217;s explain worker processes, <strong><em>web gardens</em></strong> and <strong><em>web farms</em></strong> in a little more detail so that we can understand the issues of synchronization, speed, reliability and scalability in the context of caching. Doing so would not only help us realize the drawbacks that <a>ASP.NET Cache</a> entails but it will also make it possible for us to outline the situations in which one should contemplate using it or looking for alternative solutions.<span id="more-136"></span></p>
<p><strong>Worker Process:</strong></p>
<p>Worker processes help separate various applications running on one server. If one worker process fails or collapses, it does not affect the other applications that are running in separate worker processes. This makes the server environment stable without any drop in an application&#8217;s performance due to process separation.</p>
<p>Similarly, a single application can run in multiple worker processes that are all independent of each other. This provides reliability for the application in case one worker process gets corrupted. However, each worker process now contains its own instance of the Cache and you end up with multiple copies of the same cache on the same web server.</p>
<p>Additionally, worker processes do recycle by default although you can configure them not to. Once they recycle, any data in the process is lost. And, Cache housed inside of such processes is no different. This causes major issues which will be discussed in the next post in this category.</p>
<p><strong>Web</strong><strong> Gardens</strong><strong>:</strong></p>
<p>A Web Garden configuration means an application running in more than one worker process on a server. Having multiple worker processes provides reliability because if any one worker process gets corrupted, another one is available to service user requests. Multiple worker processes also provides more memory to the application because each worker process has its own memory.</p>
<p>In the context of InProc (in process) caching &#8211; one that <a>ASP.NET Cache</a> provides &#8211; this has some peculiar issues. Each worker process has its own copy of the Cache. And, while this might allow more Cache storage space, it also creates a cache synchronization problem across worker processes. This can cause some data integrity issues if two caches are out of sync.</p>
<p><strong>Web Farms:</strong></p>
<p>A Web farm can be described as multiple servers hosting a single application and sharing the user request load. When your online users grow, you need to add more servers to process the various user requests that pour in. These servers share the load through a common load balancer than distributes these requests on an even basis among these servers.</p>
<p>In such a situation the need for caching is even more accented. As the number of users increases, so does the load on your application. For example, the number of sessions would go up significantly on each of your web servers. The data that needs to be created by your application is also compounded. The network trips needed to access the database are multiplied and the I/O operations increase rapidly. If you do not handle this load properly, due to all the above mentioned overheads, the performance of your application could be severely hampered. It might respond slowly, prompting your users to lose interest and resulting in loss of revenue for the service provider.</p>
<p>These are just the circumstances around which ASP.NET operates. Once we consider <a>ASP.NET Cache</a> for Web farms, we start to know that its bottlenecks far outweigh the performance overheads discussed above, especially in the case of Web Farms.</p>
<p>A caching solution should have the ability to properly address the above mentioned bottlenecks and configuration drawbacks. It should not only provide a performance enhancement &#8211; which ASP.NET does &#8211; but also be able to make an application more scalable so it can handle more users and session data. It should also be able to make an application perform reliably and efficiently.</p>
<p>Now, exactly how does <a>ASP.NET Cache</a> fare in light of the various requirements, bottlenecks and restrictions highlighted in this post! Read the next post to find out. If you need immediate information try visiting <span style="font-size:x-small;"> </span><a title="NCache" href="http://www.alachisoft.com/rp.php?dest=/ncache/asp-net-cache.html" target="_blank"><span>www.alachisoft.com</span></a></p>
<p><!-- AddThis Button BEGIN --><br />
<a href="http://www.addthis.com/bookmark.php" target="_blank"><img class="alignright" src="http://s9.addthis.com/button1-bm.gif" border="0" alt="Bookmark and Share" width="125" height="16" /></a><br />
<!-- AddThis Button END --></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetcache.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetcache.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetcache.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetcache.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aspnetcache.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aspnetcache.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aspnetcache.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aspnetcache.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetcache.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetcache.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetcache.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetcache.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetcache.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetcache.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetcache.wordpress.com&amp;blog=4635281&amp;post=136&amp;subd=aspnetcache&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aspnetcache.wordpress.com/2008/10/08/intro-to-asp-net-cache-limitations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Paul</media:title>
		</media:content>

		<media:content url="http://s9.addthis.com/button1-bm.gif" medium="image">
			<media:title type="html">Bookmark and Share</media:title>
		</media:content>
	</item>
	</channel>
</rss>
