# Benchmarks

- Canonical URL: https://docs.fairvisor.com/docs/benchmarks/
- Section: docs
- Last updated: n/a
> Independent, reproducible benchmarks of Fairvisor edge performance.


All benchmarks are reproducible. Run them on your hardware — see [Reproduce](#reproduce) below.

## Test setup (March 2026 run)

- **Hardware:** 2 × AWS c7i.xlarge (4 vCPU, 8 GB RAM each), cluster placement group, eu-central-1
- **OS:** Ubuntu 24.04 LTS
- **Fairvisor:** latest `main` from `github.com/fairvisor/edge`
- **OpenResty:** 1.29.2.1 (native, no Docker)
- **Load generator:** k6 v0.54.0 (`constant-arrival-rate`)
- **Profile:** 10,000 RPS steady state, 60s run, 10s warmup
- **Topology:** two-host — Fairvisor and k6 on separate machines (VPC private network)
- **Decision API method:** `POST /v1/decision` with `X-Original-Method` and `X-Original-URI`
- **Reverse proxy path:** includes enforcement + upstream proxy hop to backend nginx

## Latency

Results at 10,000 RPS (steady state):

| Percentile | Fairvisor (decision only) | Fairvisor (reverse proxy) | Raw Nginx (no rate limiting) |
|-----------|--------------------------|--------------------------|------------------------------|
| p50 | 304μs | 302μs | 235μs |
| p90 | 543μs | 593μs | 409μs |
| p99 | 2.00ms | 1.79ms | 1.95ms |
| p99.9 | 4.00ms | 5.12ms | 3.62ms |

**Enforcement overhead over raw Nginx baseline: p50 +69 µs / p90 +134 µs.**

## Throughput

Max sustained throughput (single edge):

| Configuration | Max RPS |
|--------------|---------|
| Simple rate limit (1 rule) | 195,000 |
| Complex policy (5 rules, JWT parsing, loop detection) | 195,000 |

## Memory (reference sizing)

The following memory profile is retained as a sizing reference for active limiter keys:

| Active limit keys | Memory usage |
|------------------|--------------|
| 1,000 | 48 MB |
| 10,000 | 120 MB |
| 100,000 | 680 MB |
| 1,000,000 | 5.2 GB |

Memory scales roughly linearly with active limit keys because each key keeps a small fixed token-bucket state.

## Reproduce {#reproduce}

```bash
git clone https://github.com/fairvisor/benchmark
cd benchmark
bash run-all.sh
```

Results are published with every release.

