Skip to content
Vasily Korytov edited this page Nov 28, 2016 · 15 revisions

httpstress 6

CLI utility for stress testing of HTTP servers with many concurrent connections.

Returns 0 if no errors, 1 if some requests failed, 2 on kill and 3 in case of invalid options.

Prints elapsed time and error count for each URL to stdout (if any; does not count successful attempts). Usage and runtime errors go to stderr.

Usage

httpstress [options] <URL list>

Options

  • -c <int>: concurrent connections number (defaults to 1)
  • -n <int>: total connections number (defaults to URL count)
  • --version: print version to stdout and exit

Example usage

httpstress -c 1000 http://localhost https://192.168.1.1

Notes

  • Output is JSON-formatted. Example:
{
  "errors": {
    "http://localhost": 500,
    "https://192.168.1.1": 3
  },
  "seconds": 12.8
}
  • This utility follows HTTP redirects
  • Non-200 HTTP return code is an error
  • Be sure to set ulimit -n on Unix systems high enough

Clone this wiki locally