Load testing using autocannon

amitmund June 02, 2026

autocannon

autocannon

npm install -g autocannon
-c | --connections
Number of concurrent connections to use
By default, its value is 10
-p | --pipeline
Number of pipelined requests to use
By default, its value is 1
-d | --duration
Number of seconds to run the autocannon
By default, its value is 10
-w | --workers
Number of worker threads to fire requests
-m | --method
HTTP method to use
By default, its value is 'GET'
-t | --timeout
Number of seconds before timing out and resetting a connection
By default, its value is 10
-j | --json
Print the output as newline delimited JSON
By default, its value is false
-f | --forever
Run the benchmark forever

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
autocannon -c 500 -d 5 http://localhost:8000/getAll // Running 500 connections in 5 seconds
0 Likes
11 Views

Filters

No filters available for this view.

Reset All