LinuxCommandLibrary

oha

HTTP load generator written in Rust, inspired by hey and rakyll/hey

TLDR

Send 100 requests to URL

$ oha -n [100] [https://example.com]
copy
Run load test for 30 seconds
$ oha -z [30s] [https://example.com]
copy
Test with 50 concurrent connections
$ oha -c [50] -n [1000] [https://example.com]
copy
POST request with JSON body
$ oha -m POST -d '[{"key":"value"}]' -T application/json [https://example.com/api]
copy
Use custom headers
$ oha -H "Authorization: Bearer [token]" [https://example.com]
copy
Set queries per second limit
$ oha -q [100] -z [30s] [https://example.com]
copy
Disable TLS verification
$ oha --insecure [https://example.com]
copy
Output results as JSON
$ oha -n [100] --json [https://example.com]
copy

SYNOPSIS

oha [options] url

DESCRIPTION

oha is an HTTP load generator written in Rust, inspired by hey and rakyll/hey. It provides real-time TUI visualization during load tests and detailed latency statistics.
By default, oha displays a terminal interface showing request progress, latency distribution, and error rates. Use --no-tui for scripted execution or --json for machine-readable output.
The tool measures response time distribution including percentiles (p50, p90, p99), throughput, and error rates. With --latency-correction, it applies coordinated omission correction for accurate latency under load.
Rate limiting with -q enables controlled load testing without overwhelming targets. Combined with -z for duration-based tests, this enables realistic traffic simulation.
oha supports HTTP/1.1 and HTTP/2, custom headers for authentication, and various request body formats for API testing.

PARAMETERS

-n num

Number of requests to send. Default: 200.
-c num
Number of concurrent connections. Default: 50.
-z duration
Duration of test (e.g., 10s, 1m).
-q rate
Rate limit in queries per second.
-m, --method method
HTTP method: GET, POST, PUT, DELETE, etc.
-d, --data body
Request body data.
-D, --data-file file
Read request body from file.
-T, --content-type type
Content-Type header value.
-H header
Custom header (repeatable).
-A, --accept type
Accept header value.
-t, --timeout secs
Request timeout in seconds.
--latency-correction
Enable coordinated omission correction.
--no-tui
Disable real-time terminal UI.
--json
Output results in JSON format.
--insecure
Skip TLS certificate verification.
--http2
Use HTTP/2.
--host host
Override Host header.
-p, --redirect num
Maximum redirects to follow.

CAVEATS

High concurrency settings may exhaust file descriptors or network resources. Use --insecure cautiously. Rate limiting accuracy depends on system capabilities. Results should be interpreted considering network conditions.

HISTORY

oha was created by Haruki Shimada (hatoo) and first released around 2020. The name means "good morning" in Japanese. Written in Rust using tokio for async I/O, it provides modern load testing with real-time visualization. The project gained popularity as a fast, user-friendly alternative to older tools like ab and wrk.

SEE ALSO

hey(1), wrk(1), ab(1), curl(1), siege(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community