# oha

> HTTP load generator written in Rust that sends requests to a web application and shows live results in a terminal UI, inspired by rakyll/hey.

Stars: 10.6k · Language: Rust · License: MIT · Categories: Network

- Repository: https://github.com/hatoo/oha
- Page: https://www.trmn.sh/tools/oha

## Install

- Homebrew: `brew install oha`
- Pacman: `pacman -S oha`
- Cargo: `cargo install oha`

## Overview

oha is an HTTP load generator written in Rust, built on tokio with a ratatui-based terminal UI. It sends a configurable number of requests (-n, default 200) or runs for a fixed duration (-z, e.g. 10s or 3m) against a target URL, using a set number of concurrent connections (-c, default 50). While running, it displays realtime statistics in the TUI. When finished, it prints a text summary. It is inspired by rakyll/hey, but its -q option sets an overall queries-per-second limit rather than a per-worker limit.

It supports HTTP/1.x, HTTP/2 (with -p for parallel requests per connection), and experimental HTTP/3 through a build feature. Request options include custom methods, headers, bodies (inline, from file, or line by line from file), curl-compatible multipart forms, basic auth, AWS SigV4 signing, proxies, client certificates, unix sockets, and --connect-to DNS overrides. URLs can be read from a file or generated from a regex with --rand-regex-url. Rate control includes --burst-delay and --burst-rate, and --latency-correction addresses coordinated omission when -q is set.

Output can be text, JSON (with a published schema.json), CSV with one line per request, or quiet, and results can be written to a file with -o. Successful requests can be stored in a SQLite database with --db-url, and --debug performs a single request and dumps the request and response. With --no-tui and no -q or --burst-delay, oha uses a faster implementation that avoids the overhead of gathering realtime data. It is aimed at developers and SREs benchmarking web services on Linux, macOS, and Windows.

### Installation

```bash
# via Homebrew
brew install oha
```

```bash
# via Pacman
pacman -S oha
```

```bash
# via Cargo
cargo install oha
```

![oha running a load test with the realtime TUI](https://media.trmn.sh/cached/24493b4a24c053300ca581dc1135a23d8e7342442eeacd4425b2a395495fda0c.gif)

## Alternatives

- [bandwhich](https://www.trmn.sh/tools/bandwhich.md): CLI utility that displays current network utilization by process, connection and remote IP/hostname (Rust, 12.0k stars)
- [websocat](https://www.trmn.sh/tools/websocat.md): Command-line WebSocket client and server, like netcat, curl and socat for ws:// and wss://, with TCP/UNIX socket proxying and program execution. (Rust, 8.7k stars)
- [gping](https://www.trmn.sh/tools/gping.md): Ping utility with real-time graphical display of response times and command execution times (Rust, 12.7k stars)
- [xh](https://www.trmn.sh/tools/xh.md): HTTP client that reimplements HTTPie's syntax with focus on improved performance and speed. (Rust, 8.2k stars)
- [trippy](https://www.trmn.sh/tools/trippy.md): Network analysis tool combining traceroute and ping functionality for diagnosing networking issues (Rust, 8.1k stars)

---

Canonical: https://www.trmn.sh/tools/oha
