tags:

views:

50

answers:

2

Hi. I want to test my server as to how many simultaneous connections it can handle .. having considerably low connection problems... in other words to simulate a stress testing Scenario. How do I go about it? Thanks for your advice.

A: 

If it's a web server see http://support.microsoft.com/kb/231282

Rodrick Chapman
i am not looking for a stress testing tool.. i want to simulate a stress testing scenario .. like for instance .. i want to connect say 1000 clients to a server, so will my server be able to handle 1000 clients .. so how do i simulate 1000 clients connection to my server..thanx
phen
@phen, if the server is able to accept 1000 simultaneous clients don't assume that it will be able to handle 1000 clients. Accepting connections is one thing, handling them is something entirely different. That's why I asked you if your server uses some particular protocol. You responded TCP but even HTTP is based on TCP, so could you be a little more specific? Are the clients written by you?
Darin Dimitrov
it uses http .. and yes the clients are the one that i have to write. ..not the server.. .. simulate say 1000 or 2000 users connecting to the server simoultaneouslyand yes what i am trying to do is.. first simulate 1000 users .. and then say 1000 users clicking a url or downloading the same file from my server .. n like how many times it showed network connection problems..thanx
phen
A: 

You could create a class called SimulatedClient, which encapsulates a Thread. The Thread could just connect to your server, or send a HTTP GET request simulating downloading a file, or anything else you'd like. You could create any sort of application to host the clients, say a Console or WPF app.

It would create any number of SimulatedClients (perhaps configurable in app.config), start them all then monitor for problems (by catching and logging exceptions - or simply breaking into the debugger) and/or perform any performance testing. If it's the latter I would suggest taking a look at the System.Diagnostics.Stopwatch class.

With a WPF or other kind of visual app you could have a nice grid (e.g. ListView with the View set to a GridView) bound to the collection of simulated clients, with columns for things like Status, Duration, Errors - if you made them DependencyProperties you would see the results update in realtime.

Kieren Johnstone
alright .. thanks a lot.
phen