Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsApr 15, 2026·3 min de lectura

Vegeta — HTTP Load Testing Tool at Constant Request Rates

Fast Go HTTP load generator that sustains a precise constant request rate and emits HDR histograms, JSON reports, and latency plots.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Vegeta
Comando de instalación directa
npx -y tokrepo@latest install b048c0d2-38d6-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

TL;DR
Vegeta sustains precise constant request rates and produces HDR histograms and latency reports.
§01

What it is

Vegeta is a Go-based HTTP load testing tool that attacks endpoints at a precise constant request rate. Unlike tools that ramp up connections until the server breaks, Vegeta maintains the rate you specify and measures how the server responds. It produces HDR histograms, JSON reports, latency distributions, and visual plots.

Vegeta targets backend engineers, SREs, and performance testers who need reproducible load tests with accurate latency measurements.

§02

How it saves time or tokens

Vegeta's constant-rate approach produces more meaningful results than burst-based tools. You know exactly how many requests per second were sent, making it easy to compare runs and identify regressions. The CLI piping model (attack | encode | report) is composable and scriptable.

Vegeta is a single binary with zero dependencies. No JVM, no config files, no cluster setup.

§03

How to use

  1. Install Vegeta: go install github.com/tsenart/vegeta@latest or brew install vegeta
  2. Create a targets file with HTTP endpoints
  3. Run an attack at a specified rate
  4. Generate reports from the results
§04

Example

# Attack at 100 requests/second for 30 seconds
echo 'GET https://api.example.com/health' | \
  vegeta attack -rate=100 -duration=30s | \
  vegeta report

# Output:
# Requests      [total, rate, throughput]  3000, 100.03, 99.97
# Duration      [total, attack, wait]      30.01s, 29.99s, 12.1ms
# Latencies     [min, mean, 50, 90, 95, 99, max]  2.1ms, 12.3ms, 10.1ms, 22.4ms, 35.6ms, 89.2ms, 210.1ms
# Success       [ratio]                   99.87%
# Status Codes  [code:count]              200:2996  500:4

# Generate a latency plot
echo 'GET https://api.example.com/health' | \
  vegeta attack -rate=100 -duration=30s | \
  vegeta plot > latency.html

# Multiple endpoints with headers
cat <<EOF | vegeta attack -rate=50 -duration=10s | vegeta report
GET https://api.example.com/users
Authorization: Bearer token123

POST https://api.example.com/orders
Content-Type: application/json
@body.json
EOF
§05

Related on TokRepo

§06

Common pitfalls

  • Running Vegeta from a machine with limited bandwidth distorts results; test from a host near the target
  • Very high rates (10K+/s) may exhaust local ports; increase ulimit -n and use connection keep-alive
  • Vegeta measures client-side latency including network time; compare results from the same network location

Preguntas frecuentes

How does Vegeta compare to wrk or ab?+

wrk and ab maximize throughput by opening as many connections as possible. Vegeta maintains a precise constant rate. Use wrk to find the breaking point; use Vegeta to measure behavior at a specific load level.

Can Vegeta send POST requests with body data?+

Yes. Specify the HTTP method, headers, and body in the targets file. Use @filename to reference a body file. Vegeta supports all HTTP methods including POST, PUT, PATCH, and DELETE.

Does Vegeta support distributed load testing?+

Not natively. Vegeta runs on a single machine. For distributed testing, run Vegeta on multiple machines and merge results. The binary format allows combining results from multiple sources.

What output formats does Vegeta support?+

Vegeta produces text reports (default), JSON reports, HDR histogram data, and HTML latency plots. The pipeline model lets you choose the output format by piping to 'vegeta report' with different flags.

Can I use Vegeta in CI/CD pipelines?+

Yes. Vegeta's CLI interface and exit codes make it suitable for CI/CD. Set a latency threshold and fail the pipeline if p99 exceeds it. The JSON output can be parsed by CI scripts for automated assertions.

Referencias (3)

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados