CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

David Hayden [MVP C#]

         .NET Tutorials, Patterns, and Practices

Developing High Performance and Scalable ASP.NET Websites

A handful of times this week I heard someone mention the phrase - developing high performance and scalable ASP.NET websites.  I don't know why, but everytime I hear this phrase I am attracted to it like a moth to a flame.  All professional ASP.NET developers want to walk with their head up high and claim that they develop high performance and scalable ASP.NET websites.  It sort of separates the men from the boys.

In fact, I mentioned the terms just recently myself in regard to the latest INETA sponsored, Sarasota .NET Developer Group Meeting where Shawn Wildermuth gave a presentation on ADO.NET Tips & Tricks.  Many of the ADO.NET Tips & Tricks had to do with performance and scalability.

Aside from my own blabbering, however, the following resources or presentations were referenced in various blogs and articles concerning high performance and scalability:

If you're new to ASP.NET web development, I encourage you to browse through the various resources mentioned above.  Obviously the Tampa Code Camp hasn't happened yet, but if you are attending the event, you may want to attend Russ' session.

As you read through the material you may notice 2 things.

  1. The information is quite consistent as far as recommendations.  This is a good thing.
  2. Some of the best ways to improve performance and scalability in your ASP.NET websites are extremely easy!

 

Output Caching - Caching ASP.NET Pages

“ASP.NET allows you to cache the entire response content for dynamic pages on HTTP 1.1 capable mechanisms, including browsers, proxy servers, and the Web server where your application resides. This provides a powerful way for you to increase the performance of your Web applications. Called output caching, it allows subsequent requests for a particular page to be satisfied from the cache so the code that initially creates the page does not have to be run upon subsequent requests. Using this technique to cache your site's most frequently accessed pages can increase your Web server's throughput, commonly measured in requests per second, substantially.” - Caching ASP.NET Pages

This is an example of how complicated it is:

<%@ OutputCache Duration="60" VaryByParam="None" %>

It doesn't get any easier than that!

Obviously you don't want to cache personal or security sensitive information as well as data that changes a lot, but a lot of pages on websites are often static or don't need to be updated in real time.  Your web application can get an immense performance and scalability boost with something insanely simple as this.  Thank you Microsoft!

 

Think About Your User Interface

I didn't hear this mentioned directly in the resources above, but you also want to build a user interface for your clients that avoids the need to click around a lot.  The less a client requests information from your website, the more HTTP requests your website or web application can handle as a whole.  The most sought after information can be grouped accordingly and wisely on your pages so that it eliminates the need for your visitors to have to browse and drill-down to information they want the most.  This again is one of the easiest ways to improve performance on your website and doesn't require 20 years of development experience.

 

Conclusion

Some of the best ways to develop high performance and scalable ASP.NET websites require only the simplest solutions.  New ASP.NET web developers can take advantage of the specific two methods mentioned above as well as other methods mentioned in the above resources without a lot of effort or training.

 

Now Playing: Sandstorm by Darude

DrinkingJapanese Sencha Green Tea

 


Published Jul 02 2005, 03:45 PM by David Hayden
Filed under:

Comments

Jeffrey Palermo said:

Great post. So many developers I run into want to immediately think about optimizing the code. The analyze server controls and try to "minimize child objects" because it's supposed to enhance performance. They spend time on trying to squeeze a few miliseconds out of the code, and they ignore the out-of-process communication that takes half a second or more, and they make several of these out-of-process calls for each requests.

Database optimization is the real gainer. For a great test, everyone should mock their database in code and then do a perf test. One will surely see that their code is blazingly fast and that their database calls are bogging down the server.
# July 2, 2005 9:31 PM

David Hayden said:

Jeffrey made a good comment on my previous post, Developing High Performance and Scalable ASP.NET Websites,...
# July 3, 2005 10:18 AM

David Hayden said:

Jeffrey,

I can't agree more, so I wrote another post about it :)

http://codebetter.com/blogs/david.hayden/archive/2005/07/03/128787.aspx
# July 3, 2005 10:54 AM

Giddy Up! - Erik Lane's Blog said:

# July 6, 2005 3:09 PM

Giddy Up! - Erik Lane's Blog said:

# July 6, 2005 3:09 PM

Giddy Up! - Erik Lane's Blog said:

# July 6, 2005 3:10 PM

Giddy Up! - Erik Lane's Blog said:

# July 6, 2005 3:12 PM
Check out Devlicio.us!

Our Sponsors

Free Tech Publications

This Blog

Syndication

News

CodeBetter.Com Home