Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am stress testing software that is generating a lot of HTTP traffic to a speci

ID: 659463 • Letter: I

Question

I am stress testing software that is generating a lot of HTTP traffic to a specific server.

I need to set up a strong HTTP server (like Apache or IIS) that does statistics, i.e: amount of requests per minute, time to connect and allows me to simulate bad connectivity and different responses (e.g - once in a while return 500s instead of 200s, sometimes refuse connections). I am a programmer so I don't mind writing code, but I still think that writing a full stack HTTP handler (even in C#) will not be flexible enough.

I need the server to run on Windows.

Explanation / Answer

For such testing, you can use Starman or Coro pure-perl web-servers in what you can simulate anything very easily. (the full http-stack and much-more are already implemented). (for example you can check the existing middlewares on MetaCPAN.

From the Coro man page:

The simple benchmark shows this server gives 2000 requests per second in the simple Hello World app, and 300 requests to serve 2MB photo files when used with AIO modules. Brilliantly fast.

IMHO it is enough for testing especially when you can adjust anything very easily, because it is written in perl (scripting language).
Edit

Ad statistics: Here are many thing what you said together.

One is simulating some "special web server behavior", simulating bad requests/responses and so on (what are a functionalities of the web server) and therefore is handy to have a server written in an scripting language.
Second, statistics - what can be done (mostly) by logfile analysis and so on. If you need, can setup special looging method.

So adding more general informations, e.g. for apache logfile analysis you can use for example the Apache::ParseLog. Or you can use some full-featured logfile-statistics software such awstats.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote