| title | Gateway Comparison Benchmarks |
|---|---|
| sidebar_position | 4 |
Compare this gateway's proxy performance against Kong, KrakenD, Traefik, and Tyk using identical backends and load conditions.
- Docker and Docker Compose v2
- Sufficient resources (4+ CPU cores, 8+ GB RAM recommended)
- No other services on port 8080
# Quick comparison: this runway vs Kong, 30s
make compare-bench-quick
# Full 5-proxy comparison, simple proxy, 60s
make compare-bench
# All scenarios (simple + auth + ratelimit), all gateways, 60s each
make compare-bench-full
# Tear down all services
make compare-down| Scenario | Path | Features | Gateways |
|---|---|---|---|
simple |
/simple |
Proxy passthrough only | All 5 |
auth |
/auth |
API key validation | gw, Kong, Tyk |
ratelimit |
/ratelimit |
10k req/s rate limit | All 5 |
KrakenD and Traefik are skipped for the auth scenario because they lack native API key authentication comparable to the other gateways.
Environment variables control benchmark parameters:
| Variable | Default | Description |
|---|---|---|
GATEWAYS |
gw kong krakend traefik tyk |
Space-separated list of gateways to test |
SCENARIOS |
simple |
Space-separated list of scenarios |
DURATION |
60 |
Test duration in seconds |
WARMUP |
5 |
Warmup duration in seconds |
CONCURRENCY |
50 |
Number of concurrent connections |
QPS |
0 |
Requests per second limit (0 = unlimited) |
Example:
GATEWAYS="gw kong" DURATION=120 CONCURRENCY=100 make compare-benchResults are saved to perf/compare/results/<timestamp>/ containing:
<gateway>-<scenario>-hey.txt— Rawheyoutput with latency distribution<gateway>-<scenario>-stats.csv— Docker CPU/memory samples at 1s intervalsREPORT.md— Markdown comparison table
| Gateway | RPS | Avg (ms) | P50 (ms) | P95 (ms) | P99 (ms) | Avg CPU% | Peak Mem (MB) |
|---|
Tested on Linux 5.10, 4 CPUs, 8 GB RAM, Docker 29.1, 50 concurrent connections, 60s duration per test.
| Gateway | RPS | Avg (ms) | P50 (ms) | P95 (ms) | P99 (ms) | Avg CPU% | Peak Mem (MB) |
|---|---|---|---|---|---|---|---|
| Runway (this) | 15688 | 3.2 | 2.6 | 7.5 | 11.7 | 155.9 | 44.5 |
| Kong 3.9 | 14750 | 3.4 | 2.7 | 8.4 | 12.6 | 120.9 | 572.3 |
| KrakenD 2.7 | 9405 | 5.3 | 4.2 | 13.9 | 21.0 | 155.6 | 42.6 |
| Traefik 3.3 | 14783 | 3.4 | 2.8 | 8.0 | 12.5 | 158.3 | 59.0 |
| Tyk 5.7 | 1532 | 32.6 | 9.4 | 162.5 | 435.8 | 342.5 | 57.9 |
| Gateway | RPS | Avg (ms) | P50 (ms) | P95 (ms) | P99 (ms) | Avg CPU% | Peak Mem (MB) |
|---|---|---|---|---|---|---|---|
| Runway (this) | 15038 | 3.3 | 2.8 | 7.9 | 12.1 | 156.0 | 47.3 |
| Kong 3.9 | 12140 | 4.1 | 1.9 | 13.1 | 19.9 | 123.0 | 551.2 |
| Tyk 5.7 | 9345 | 5.3 | 3.9 | 14.9 | 20.8 | 180.4 | 58.6 |
KrakenD and Traefik are excluded — they lack native API key authentication.
| Gateway | RPS | Avg (ms) | P50 (ms) | P95 (ms) | P99 (ms) | Avg CPU% | Peak Mem (MB) |
|---|---|---|---|---|---|---|---|
| Runway (this) | 13946 | 3.6 | 3.0 | 8.4 | 12.9 | 158.0 | 44.9 |
| Kong 3.9 | 7231 | 6.9 | 6.2 | 14.6 | 21.9 | 170.6 | 552.1 |
| KrakenD 2.7 | 10010 | 5.0 | 3.9 | 13.1 | 20.0 | 154.5 | 49.4 |
| Traefik 3.3 | 18939 | 3.0 | 2.1 | 7.0 | 11.5 | 157.7 | 62.4 |
| Tyk 5.7 | 52091 | 3.0 | 0.8 | 2.0 | 3.5 | 153.9 | 35.2 |
Note: RPS counts all responses including rejections. Traefik's high total RPS includes 429 rejections (~43% of responses); its successful throughput is ~9.5k req/s, correctly enforcing the limit. Tyk returned 404 for all requests in this scenario (route misconfiguration in the benchmark), so its numbers are not meaningful.
Each gateway runs one at a time to avoid resource contention. The flow for each gateway:
- Start the gateway container (with profile isolation)
- Wait for health check to pass
- Run a short warmup with
hey - Collect
docker statsin the background - Run the benchmark with
hey - Save results and stop the gateway
All gateways proxy to the same nginx backend returning a static JSON response.
| Gateway | Image | Notes |
|---|---|---|
| This gateway | Built from source | Dockerfile in project root |
| Kong | kong:3.9 |
DB-less declarative mode |
| KrakenD | devopsfaith/krakend:2.7 |
no-op encoding (no transform) |
| Traefik | traefik:v3.3 |
File provider |
| Tyk | tykio/tyk-gateway:v5.7 |
Requires Redis (included) |
- All gateways run as Docker containers with default resource limits on the same host. Results reflect containerized performance, not bare-metal.
heyalso runs in Docker on the same host, sharing CPU. Network overhead is minimal (Docker bridge) but CPU is shared between the load generator and gateway.- Rate limit implementations differ across gateways (token bucket, sliding window, fixed window). The
ratelimitscenario validates throughput under a high limit, not precision. - Tyk requires Redis as a dependency. This is standard for Tyk deployments but adds an extra container.
- KrakenD uses
no-opencoding, which passes responses through without JSON parsing. This is the fairest comparison for pure proxy throughput. - For production decisions, run benchmarks on representative hardware with your actual workload patterns.