Autocannon is a fast HTTP/1.1 benchmarking tool written in Node.js that measures server performance under load.
The tool addresses the need to benchmark HTTP servers with high-fidelity load testing. It works by sending configurable numbers of concurrent requests to a target server and measuring response latencies and throughput. Autocannon supports HTTP pipelining and HTTPS, allowing it to simulate realistic client behavior. The tool reports latency percentiles at the 2.5%, 50%, 97.5%, and 99% marks to show both typical performance and outlier behavior, alongside request volume metrics sampled per second.
Autocannon suits developers who need to benchmark Node.js servers or any HTTP/1.1 endpoint and want results comparable to established tools like wrk and wrk2. The tool can be used from the command line for quick testing or integrated programmatically into test suites via its API. It includes a workers mode that distributes load across multiple Node.js worker threads, dividing connections and request amounts among them while applying rate limits per worker. This approach allows scaling load generation beyond what a single thread can produce. The README names wrk and wrk2 as inspirations and notes that autocannon can produce more load than those tools on equivalent hardware.
The project maintains active continuous integration testing. Development activity shows consistent engagement with bug fixes and feature refinements applied regularly. The codebase receives updates addressing edge cases and performance improvements across multiple areas of the benchmarking pipeline.