1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 21:22:09 +02:00
tldr/pages/common/ab.md
Nir Elbaz 8d70685f0b
ab: add POST request example (#3805)
* Update ab.md

Sending POST requests

* Update pages/common/ab.md

Co-Authored-By: Marco Bonelli <mebeim@users.noreply.github.com>

Co-authored-by: Marco Bonelli <mebeim@users.noreply.github.com>
2020-01-29 12:53:07 +01:00

24 lines
627 B
Markdown

# ab
> Apache Benchmarking tool. The simplest tool to perform a load testing.
> More information: <https://httpd.apache.org/docs/2.4/programs/ab.html>.
- Execute 100 HTTP GET requests to a given URL:
`ab -n {{100}} {{url}}`
- Execute 100 HTTP GET requests, processing up to 10 requests concurrently, to given URL:
`ab -n {{100}} -c {{10}} {{url}}`
- Use keep alive:
`ab -k {{url}}`
- Set the maximum number of seconds to spend for benchmarking:
`ab -t {{60}} {{url}}`
- Execute 100 HTTP POST requests to a given URL, using a JSON payload from a file:
`ab -n {{100}} -T {{application/json}} -p {{data.json}} {{url}}`