I have a server which blocks burst request (if the same IP address accesses the server more than 3 times a second, it will serve 500 error).

So when I use Apache benchmark, I see a lot of failed requests, even when I set concurrency to 1.

Is there an option to set an interval between each request? Or is there similar benchmarking tools that offers this interval functionality?


You're really not going to accomplish any meaningful load testing with concurrency limited to 3. You probably need to remove the requests per second restriction for the IP that you're testing from.

| improve this answer | |

You could run ab through watch to delay the repeated access, but you're not going to be able to use the report summary for much.

watch -n 1 ab -n 3 http://serverfault.com/

Or run it through curl instead of ab

watch -n 0.4 curl http://serverfault.com/

More about watch: http://www.linfo.org/watch.html

| improve this answer | |

There is no such option.

Only configurable timing settings is

-t timelimit

Maximum number of seconds to spend for benchmarking. This implies a -n 50000 internally. Use this to benchmark the server within a fixed total amount of time. Per default there is no timelimit.

However, what is effect of benchmarking if you wait? You will not gain real results at all.

| improve this answer | |

And you may add a text file to log verbosity.

watch -n 1 'ab -n 3 -v3 http://serverfault.com/ >> ab.txt'

You may count ocurrence of errors 5xx. In vim for example:

:%s/HTTP\/1.1 5//n

Or permanent moves 3xx

:%s/HTTP\/1.1 3//n

And then fine analyse your hosting for tunning performance.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.