ScriptsJul 14, 2026·3 min read

Fortio — Load Testing Library and CLI from the Istio Project

Fortio is a fast, lightweight load testing tool and Go library for HTTP, gRPC, and TCP with a built-in web UI for viewing real-time latency histograms.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 29/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
CLI Tool
Install
Single
Trust
Trust: Established
Entrypoint
Fortio Overview
Safe staging command
npx -y tokrepo@latest install 3190293b-7f5d-11f1-9bc6-00163e2b0d79 --target codex

Stages files first; activation requires review of the staged README and plan.

Introduction

Fortio started as the load testing tool for the Istio service mesh project and has since become a standalone tool. It focuses on providing accurate latency measurements at a specified query-per-second rate, making it useful for both micro-benchmarks and sustained load testing.

What Fortio Does

  • Generates constant QPS load against HTTP, gRPC, and TCP endpoints
  • Records latency histograms with configurable percentile reporting
  • Serves a web UI for triggering tests and visualizing results interactively
  • Functions as a Go library for embedding load generation into custom tools
  • Includes an echo server for testing proxies and service meshes

Architecture Overview

Fortio uses a pool of goroutines to maintain a target request rate, recording each response time in a histogram data structure. The CLI mode runs a test and prints results, while server mode exposes a REST API and web dashboard. Results are stored as JSON and can be compared across runs in the UI. The echo server component mirrors request headers and bodies for debugging network paths.

Self-Hosting & Configuration

  • Install as a single binary via Go, Homebrew, or Docker
  • Set target QPS with -qps and duration with -t flags
  • Configure connection reuse, HTTP headers, and payload with CLI flags
  • Run in server mode to access the web UI on port 8080
  • Export results as JSON for post-processing or comparison

Key Features

  • Constant QPS mode provides predictable load patterns for reliable benchmarking
  • Accurate percentile histograms without reservoir sampling artifacts
  • Built-in web UI for interactive test execution and result visualization
  • Dual-use as both CLI tool and embeddable Go library
  • Lightweight single binary with minimal resource footprint

Comparison with Similar Tools

  • k6 — scriptable load testing in JavaScript; Fortio focuses on constant-rate testing with simpler configuration
  • wrk — high-performance HTTP benchmarking; Fortio adds gRPC support and a web UI
  • Vegeta — constant-rate HTTP attack tool; Fortio includes an echo server and web dashboard
  • Locust — Python-based distributed load testing; Fortio is a single-binary tool without distributed setup
  • hey — simple HTTP load generator; Fortio provides richer histogram analysis and persistent results

FAQ

Q: What makes Fortio different from other load testing tools? A: Fortio maintains a precise constant QPS rate and records full latency histograms, avoiding the coordinated omission problem common in other tools.

Q: Can I use Fortio as a library in my Go application? A: Yes, Fortio provides a Go API for programmatic load generation and result collection.

Q: Does it support distributed testing? A: Fortio is designed as a single-instance tool. For distributed scenarios you can run multiple Fortio instances and aggregate results.

Q: How do I compare results across runs? A: The web UI supports loading multiple JSON result files and overlaying their latency histograms.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets