I'd like to use cURL to test flood handling on my server. Right now I'm using this on a Windows command line:
curl www.example.com
which will GET
the page once. I'd like to now do the same thing, except instead of one request, I want to generate at least 10 requests at once. How would I do this?
The solution to this is to use the xargs command as shown alongside the curl command. The -P flag denotes the number of requests in parallel. The section <(printf '%s\n' {1.. 10}) prints out the numbers 1 – 10 and causes the curl command to run 10 times with 5 requests running in parallel.
While curl is a very useful and flexible tool, isn't intended for this type of use. There are other tools available which will let you make multiple concurrent requests to the same URL.
ab is a very simple yet effective tool of this type, which works for any web server (despite the introduction focusing on Apache server).
Grinder is a more sophisticated tool, which can let you specify many different URLs to use in a load test. This lets you mix requests for cheap and expensive pages, which may more closely resemble standard load for your website.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With