codesenberg / bombardier

Fast cross-platform HTTP benchmarking tool written in Go
MIT License
6k stars 313 forks source link

Does Bombardier send more requests than what was requested? #69

Open shivanan opened 3 years ago

shivanan commented 3 years ago

When testing concurrent connections where the total number of requests is roughly of the same order of magnitutde as the number of concurrent connections ( -n 100 -c 100 for example) it looks like bombardier is sending more requests than advertised.

Even though the stats show 100 requests. My server is recording a bit more - some times as much as 40% more requests being sent.

This comes up when the concurrency is high relative to the number of requests.

What version of bombardier are you using?

[~/gocode/bin]  $./bombardier --version
bombardier version unspecified darwin/amd64
[~/gocode/s...desenberg/bombardier] master $git rev-parse head
5e387c23434f632213c1039d5f0ada93d6153f1e

What did you do?

This is the command I ran:

./bombardier -n 100 -c 100 -m POST  "http://localhost:3000/v1/key/abc1" -H "Authorization: sEXPkIPVlWf5ebCvqgCNkP2p3dEtQAE1KctTcnOFUJw=" --body='{"increment":"1"}' -H "Content-Type: application/json"

I got this output:

Bombarding http://localhost:3000/v1/key/abc1 with 100 request(s) using 100 connection(s)
 100 / 100 [===============================================================================================================================================] 100.00% 23/s 4s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec        24.70      23.87     115.65
  Latency         2.03s      0.85s      4.04s
  HTTP codes:
    1xx - 0, 2xx - 100, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:    14.40KB/s

against a local node.js based test server.

What you expected to happen?

100 requests to be sent to the web server.

What actually happened?

The stats look correct but my web server is indicating more requests were being sent.

codesenberg commented 3 years ago

Hi, @shivanan. In order to look into this I'm going to need a minimalistic server setup similar to yours for reproduction. There is a test however that checks if a right number of requests was fired.