We're implementing a new solution in our classic ASP environment that's using COM interop to instatiate a .NET component to do some work. The solution is working great and our team lead wants to make sure that it will perform well under load since this is the first time we'll be working with .NET components on our site.
What do I need to consider to do a proper test to make sure that the new code I introduced won't break under load?
What I'm already doing:
I made a simple asp web page that calls the new component based on the information in the query string. The query string also has an "off switch" parameter so I can test the page without the component as a default. The page itself is bare except for returning a value that represents whether or not the component was a success, failed, or was skipped.
I wrote a simple console application that uses an HttpWebRequest
to make iterative calls to the ASP page using unique data from the database on each call. All it does and check the value that the page returns and save the data.
I then deployed the console application to four different PCs on our internal network. In one test, I set up one instance of the application on each of the computers, and in another instance, I set up five instances of the application on each machine and configured them to all begin hitting the development server at the same time. Each instance of the application made 150 iterative requests to the web server.
For each scenario (one instance on each machine & five instances on I each machine), I ran the test twice, once without the component being called, and once with the component being called. In both scenarios, performance with the component being called took about 2.2 times as long to complete the request than when the component wasn't called. We thought that wasn't very expensive considering the amound of processing we were doing and the number of trips being made to the database to update the data. Also, because the 2.2x ratio seemed consisent in both the scenario where we hit the server with 4 concurrent connections and when we hit the server with 20 concurrent connections, it seems to be operating OK.
The 20-instance tests certainly put a lot of load on our development server both with and without the new component running, but the new component seemed to fair well enough under stress. However, I want to make sure that I went about this the right way and am not pointing to a positive pass of a weak test to prove that my component won't bring the server to its need under peak load.