This post originated from an RSS feed registered with .NET Buzz
by Udi Dahan.
Original Post: Web App Design: Avoid Writing to Disk?
Feed Title: Udi Dahan - The Software Simplist
Feed URL: http://feeds.feedburner.com/UdiDahan-TheSoftwareSimplist
Feed Description: I am a software simplist. I make this beast of architecting, analysing, designing, developing, testing, managing, deploying software systems simple.
This blog is about how I do it.
Kirk Allens recently posted something about avoiding writing to disk in web apps. I believe that this particular piece of advice is rooted in the performance of dealing with images and databases (see part 1 of his advice), but in the comments he brings up file-replication between servers as another reason.
Personally, on the file-replication issue, I don't see why a simple NAS couldn't solve that for relatively large web farms. In the case of only a couple of servers, a simple file-share would do.
On to performance.
Or rather scalability.
The way that the internet works today, as far as I understand, is that static files (like html, txt, jpg, gif, etc) get cached all over the place between your end users and your web farm. This includes ISPs and even Google. If a user requests the file http://your-site/123.jpg chances are that request won't need to come to your webfarm - it'll just be served up by someone who had that file already go through. This will (probably - I'm not 100% sure) not occur with the file http://your-site/123.ashx.
I've talked in the past about achieving maximum scalability in web apps before. While Krik's solution will work, and may slightly improve the processing time of some work, I think that scalability should really be the beacon you follow.