Load Testing – How to Test Website Performance Under Load

load-testingwebsite-performance

I have made an Asp.net MVC website and hosted it on a shared hosting provider. Since my website surrounds a very generic idea, it might have number of concurrent users sometime in future.

So, I was thinking of a way to test my website for on-load performance. Like how will the site perform when 100 or 1000 users are online at the same time and surfing the website. This will also make me understand whether my LINQ queries are well written or not.

Best Answer

First of all, the proper term is stress test. There are quite a few solutions for website stress tests, one hosted solution I'd recommend is loadimpact. What they do is bombard your site with requests from various servers worldwide and give you an analytic report of how your site handled the stress. They have a free test, where you can get a general idea, but for more you'll have to pay a subscription fee.

These kinds of tests only test the website from the visitors point of view, for more specific information you should profile your application locally, and I don't really have anything more to add to the previous answers, I'm using Apache JMeter as well.

And, lastly, as any performance conscious web developer, you should take a look at YSlow:

YSlow analyzes web page performance by examining all the components on the page, including components dynamically created by using JavaScript. It measures the page's performance and offers suggestions for improvement.

YSlow for Firefox is integrated into the Firebug web development tool for Firefox.

More often than not, I find Javascript to be the actual bottleneck and not back end code or the database. Of course badly written queries can be a major performance penalty, but after you dealt with those, always run YSlow and follow its suggestions, it's a life saver.

Further reading:

on StackOverflow, of course!

Related Topic