Leads or Matches Every Gateway, Protocol by Protocol
Ferrum Edge runs head-to-head against Envoy, Kong, Tyk and KrakenD in public GitHub Actions benchmarks: seven protocols head to head plus DTLS, payloads from 10 KB to 5 MB (UDP and DTLS use 1 KB datagrams), every gateway on the same runner with the same backend and load generator. The workflows, configurations and raw results are all in the open, so anyone can rerun them.
Same Runner, Same Backend, Same Rules
Benchmarks you can't rerun aren't worth much. These run in CI, on hardware anyone can rent, from code anyone can read.
Public CI runners
Each protocol runs as its own job on a standard GitHub-hosted ubuntu-26.04 runner. Every gateway, the echo backend and the load generator share that runner, so each comparison is made on one machine. Gateway order rotates between pairs, and a host-disturbance check flags samples another process touched.
Pinned competitors
Envoy v1.39.1, Kong Gateway 3.16.0.0, Tyk v5.15.0 and KrakenD CE 2.13.11 run from pinned Docker images next to the Ferrum Edge image built from the same commit. Each speaks the protocol end to end, client to gateway to backend.
Closed-loop load
proto_bench holds 100 concurrent connections or streams, warms each one up, then measures 30-second windows with HDR-histogram latency, checking every response byte for byte. Each cell is the median of three iterations, and each iteration pairs every gateway against a direct, no-gateway baseline.
Head-to-Head Scoreboard
Each card leads with Ferrum's margin over the closest competitor (the fastest other gateway at each payload size, as the median across ranked sizes), then lists every competitor: throughput above (+) or below (−) Ferrum's, and how Ferrum's p99 latency compares. This page compares Ferrum with each competitor pair by pair; the workflow's own summary instead counts whole protocol and payload scenarios won.
HTTP/1.1 + TLS
+13% throughput vs the closest competitor (Envoy), p99 5% lower
- vs Envoy leads
+10% to +17% throughput · p99 from 3% higher to 17% lower - vs Kong leads
+15% to +90% throughput · p99 32–72% lower - vs Tyk leads
+53% to +116% throughput · p99 24–70% lower - vs KrakenD leads
+123% throughput · p99 69% lower
HTTP/2
+30% throughput vs the closest competitor (Envoy), p99 36% lower
- vs Envoy leads
+12% to +32% throughput · p99 14–41% lower - vs Tyk leads
+93% to +194% throughput · p99 27–62% lower
HTTP/3 (QUIC)
+171% throughput vs the closest competitor (Envoy), p99 66% lower
- vs Envoy leads
+171% throughput · p99 66% lower
gRPC (TLS)
+14% throughput vs the closest competitor (Envoy), p99 33% lower
- vs Envoy leads
+3% to +17% throughput · p99 from 1% higher to 37% lower - vs Kong leads
+45% to +50% throughput · p99 5–41% lower - vs Tyk leads
+72% to +142% throughput · p99 13–47% lower
WebSocket (TLS)
+13% throughput vs the closest competitor (Envoy), p99 11% lower
- vs Envoy leads
+4% to +19% throughput · p99 6–17% lower - vs Kong leads
+142% to +290% throughput · p99 70–82% lower - vs Tyk leads
+7% to +24% throughput · p99 5–25% lower
TCP + TLS
+9% throughput vs the closest competitor (Envoy), p99 9% lower
- vs Envoy leads or ties
+1% to +10% throughput · p99 9–18% lower - vs Kong leads
+25% to +67% throughput · p99 11–34% lower
UDP
+12% throughput vs the closest competitor (Kong), p99 44% lower
- vs Envoy leads
+15% throughput · p99 39% lower - vs Kong leads
+12% throughput · p99 44% lower
UDP + DTLS
- No other gateway in the matrix proxies DTLS end to end, so Ferrum is measured against the direct baseline only.
44,043 req/s through Ferrum · 45% of direct
Where the lead comes from
The gap is widest where the work is hardest. On HTTP/3, Ferrum runs QUIC end to end on quinn, with pooled QUIC connections to each backend, and it holds its lead as payloads grow. On HTTP/2 and gRPC, response bodies stream through by default instead of being buffered, so Ferrum's throughput and tail-latency lead widen with payload size. On HTTP/1.1, WebSocket and TCP, where every serious proxy runs close to the wire, Ferrum keeps pace with Envoy and stays well ahead of Kong, Tyk and KrakenD.
Full Results by Protocol
Requests per second (median of three iterations) and p99 latency for each gateway and payload size, all from the same run. Orange marks the fastest gateway in each row.
HTTP/1.1 + TLS
| Payload | Ferrum Edge | Envoy | Kong | Tyk | KrakenD | Direct |
|---|---|---|---|---|---|---|
| 10 KB | 16,360 p99 11.4 ms | 14,535 p99 13.7 ms | 14,208 p99 16.7 ms | 7,582 p99 37.8 ms | 7,328 p99 37.2 ms | 52,622 p99 4.3 ms |
| 70 KB | 5,708 p99 33.3 ms | 5,190 p99 36.1 ms | 3,144 p99 98.9 ms | 3,045 p99 101.1 ms | 3,815 p99 67.4 ms 118 errors, not ranked | 13,713 p99 15.0 ms |
| 500 KB | 1,182 p99 169.2 ms | 1,046 p99 177.7 ms | 634 p99 453.9 ms | 763 p99 416.0 ms | 939 p99 241.4 ms 30 errors, not ranked | 2,380 p99 91.6 ms |
| 1 MB | 603 p99 159.0 ms | 516 p99 165.4 ms | 319 p99 414.2 ms | 371 p99 409.1 ms | 486 p99 199.9 ms 24 errors, not ranked | 1,158 p99 94.3 ms |
| 5 MB | 122 p99 407.0 ms | 108 p99 395.3 ms | 64 p99 1434.6 ms | 80 p99 535.6 ms | 96 p99 431.4 ms 33 errors, not ranked | 222 p99 235.1 ms |
HTTP/2
| Payload | Ferrum Edge | Envoy | Tyk | Direct |
|---|---|---|---|---|
| 10 KB | 16,193 p99 12.1 ms | 14,395 p99 14.1 ms | 5,501 p99 32.1 ms | 38,728 p99 6.1 ms |
| 70 KB | 5,567 p99 35.1 ms | 4,509 p99 47.9 ms | 2,105 p99 67.8 ms | 13,324 p99 15.9 ms |
| 500 KB | 1,019 p99 183.3 ms | 769 p99 309.5 ms | 483 p99 249.7 ms | 2,483 p99 98.1 ms |
| 1 MB | 500 p99 185.9 ms | 385 p99 290.8 ms | 248 p99 275.2 ms | 1,180 p99 85.3 ms |
| 5 MB | 97 p99 365.3 ms | 74 p99 590.8 ms | 50 p99 745.0 ms | 196 p99 217.5 ms |
HTTP/3 (QUIC)
| Payload | Ferrum Edge | Envoy | Direct |
|---|---|---|---|
| 10 KB | 19,211 p99 9.9 ms | 7,085 p99 29.4 ms | 54,044 p99 4.2 ms |
| 70 KB | 4,142 p99 47.3 ms | 1,683 p99 239.1 ms failed validity check, not ranked | 9,770 p99 22.7 ms |
| 500 KB | 586 p99 393.7 ms | 233 p99 1197.1 ms failed validity check, not ranked | 1,291 p99 146.3 ms |
| 1 MB | 301 p99 343.8 ms | 109 p99 1703.9 ms failed validity check, not ranked | 614 p99 138.6 ms |
| 5 MB | 60 p99 706.6 ms | 12 p99 6828.0 ms failed validity check, not ranked | 121 p99 627.2 ms |
gRPC (TLS)
| Payload | Ferrum Edge | Envoy | Kong | Tyk | Direct |
|---|---|---|---|---|---|
| 10 KB | 18,267 p99 11.3 ms | 17,715 p99 11.3 ms | 10,821 p99 14.0 ms 520 errors, not ranked | 7,541 p99 21.5 ms | 37,500 p99 6.5 ms |
| 70 KB | 5,922 p99 34.0 ms | 5,180 p99 42.9 ms | 3,675 p99 44.9 ms 108 errors, not ranked | 2,863 p99 44.1 ms | 10,607 p99 19.9 ms |
| 500 KB | 1,004 p99 192.5 ms | 868 p99 301.1 ms | 671 p99 201.7 ms | 560 p99 221.4 ms | 1,642 p99 144.5 ms |
| 1 MB | 493 p99 184.7 ms | 422 p99 294.9 ms | 336 p99 233.9 ms | 286 p99 231.9 ms | 747 p99 115.2 ms |
| 5 MB | 95 p99 361.5 ms | 84 p99 537.1 ms | 66 p99 609.3 ms | 55 p99 545.8 ms | 138 p99 286.0 ms |
WebSocket (TLS)
| Payload | Ferrum Edge | Envoy | Kong | Tyk | Direct |
|---|---|---|---|---|---|
| 10 KB | 38,938 p99 4.8 ms | 37,307 p99 5.8 ms | 16,062 p99 24.6 ms | 36,276 p99 6.4 ms | 79,881 p99 2.7 ms |
| 70 KB | 8,769 p99 21.6 ms | 8,156 p99 24.3 ms | 3,216 p99 71.8 ms | 7,807 p99 28.1 ms | 15,940 p99 12.3 ms |
| 500 KB | 1,607 p99 117.2 ms | 1,370 p99 131.1 ms | 498 p99 401.2 ms | 1,303 p99 123.1 ms | 2,674 p99 76.4 ms |
| 1 MB | 788 p99 117.1 ms | 665 p99 134.1 ms | 245 p99 489.7 ms | 638 p99 125.3 ms | 1,276 p99 77.3 ms |
| 5 MB | 144 p99 358.1 ms | 127 p99 379.1 ms | 37 p99 2001.9 ms | 120 p99 398.6 ms | 219 p99 226.8 ms |
TCP + TLS
| Payload | Ferrum Edge | Envoy | Kong | Direct |
|---|---|---|---|---|
| 10 KB | 46,071 p99 4.0 ms | 45,667 p99 4.9 ms | 36,995 p99 6.1 ms | 82,115 p99 2.6 ms |
| 70 KB | 10,149 p99 18.5 ms | 9,511 p99 20.3 ms | 7,986 p99 24.1 ms | 18,569 p99 11.0 ms |
| 500 KB | 1,501 p99 119.2 ms | 1,376 p99 130.5 ms | 1,147 p99 153.3 ms | 2,539 p99 70.3 ms |
| 1 MB | 751 p99 132.0 ms | 687 p99 144.4 ms | 575 p99 148.7 ms | 1,262 p99 79.9 ms |
| 5 MB | 152 p99 269.8 ms | 139 p99 308.0 ms | 91 p99 380.7 ms | 249 p99 161.2 ms |
UDP
| Payload | Ferrum Edge | Envoy | Kong | Direct |
|---|---|---|---|---|
| 1 KB | 116,296 p99 1.8 ms | 101,514 p99 3.0 ms | 103,902 p99 3.3 ms | 110,562 p99 1.0 ms |
UDP + DTLS
| Payload | Ferrum Edge | Direct |
|---|---|---|
| 1 KB | 44,043 p99 4.2 ms | 98,276 p99 2.0 ms |
Provenance
Figures come from Gateways Protocol Benchmark run 45084108106 on main at commit c855065d7. Each cell is the median of 3 iterations; raw per-sample JSON is attached to the run. As in the workflow's own scoreboard, only cells that pass the benchmark's own validity checks are ranked (10 competitor cells excluded here for errors or failed checks, shown in the tables as not ranked); a ratio within ±3% counts as a match. Data for this page: protocols.json.
Data Structure Complexity
Hot-path lookups are hash-indexed: O(1) on route-cache hits and O(path depth) on misses, with no scan over the route list as configurations grow. Only the ArcSwap snapshot reads are lock-free; DashMap reads take a per-shard read lock.
| Component | Data Structure | Lookup | Update | Concurrency |
|---|---|---|---|---|
| Global Config | ArcSwap<Config> |
Atomic load | Atomic swap | Lock-free reads, single writer |
| Route Cache (hit) | DashMap<(Host, Path), Match> |
O(1) average | Insert on miss, shard-locked | Per-shard read locks; bounded, negative results cached |
| Route Table (miss) | ArcSwap snapshot: HashMap indexes + RegexSet |
O(path depth) prefix; O(path length) regex | Rebuilt atomically on config change | Lock-free snapshot read; wildcard-host patterns scanned linearly |
| Plugin Cache | ArcSwap snapshot: HashMap<Proxy, Arc<Vec<Plugin>>> |
O(1) | Atomic swap on config change | Lock-free reads; unchanged proxies keep their plugin instances across reloads |
| Consumer Store | ArcSwap index of HashMaps |
O(1) | Atomic swap on config change | Lock-free reads; rebuilt off the hot path |
| Rate Limit State | DashMap<Key, Window> |
O(1) + lock | Updated under the key's shard write lock | Token bucket for windows up to 5 s, bounded sliding window above; not lock-free |
| Connection Pool | DashMap<Key, reqwest::Client> |
O(1) + lock | O(1) shard-locked on a new key | Shard read lock to find the client; the client's own pool takes a short lock to check out a connection |
| Health State | DashMap of unhealthy targets + AtomicU64 generation |
Atomic load + cached bitset | Shard-locked insert or remove, then a generation bump | Each balancer keeps an ArcSwap eligibility bitset and rebuilds it only when the generation moves |
What Happens on Every Request
Config Load — O(1), lock-free
Single atomic pointer load from ArcSwap. Returns a reference-counted Arc to the current config. No mutex, no blocking.
Route Lookup — O(1) on a cache hit, O(path depth) on a miss
Repeated (host, path) pairs are served from a bounded DashMap cache. On a miss the ArcSwap route table is searched by host tier (exact, wildcard, catch-all), then by exact path, an indexed longest-prefix walk over the path's segments, and finally regex routes in one RegexSet pass. Cost is independent of route count except for the wildcard-host scan.
Plugin Execution — O(P)
Linear scan over sorted plugin list (P = number of enabled plugins, typically 1-5). Each plugin executes its hook in priority order. Most requests have <5 plugins.
Upstream Selection — O(1) to O(N)
Load balancing algorithm selects upstream. Round robin is O(1) with an atomic counter, consistent hashing is an O(log V) ring search, and least connections requires an O(N) scan, but N is typically small (<20).
Connection Pool — O(1) + brief lock
Per-key client lookup: the destination, protocol, and TLS identity select one shared reqwest client from a DashMap. The client's own pool takes a brief lock to check out an idle connection (microseconds). HTTP/2 pools are almost always lock-free (multiplex on existing connection).
Proxy + Response — network-bound
Forward request to upstream, await response. This dominates total latency. All Ferrum Edge overhead is in steps 1-5 and is measured in microseconds.
30,000 Proxies, Loaded Live, Every Week
A scheduled CI job builds a multi-tenant gateway one wave at a time: each proxy gets its own consumer plus key_auth and access_control plugins, every wave is written through the Admin batch API to the running gateway with no restart, and once the wave is live and routing has converged, load is measured. It runs against SQLite, PostgreSQL and MongoDB.
| Database | RPS, first wave | RPS, last wave | Change | p99, first → last | Success |
|---|---|---|---|---|---|
| SQLite | 10,683 | 10,906 | +2.1% | 8.3 → 7.9 ms | 100.0% |
| PostgreSQL | 7,970 | 8,036 | +0.8% | 10.6 → 10.2 ms | 100.0% |
| MongoDB | 13,303 | 13,205 | -0.7% | 6.6 → 6.4 ms | 100.0% |
Why it stays flat
Route lookups, plugin resolution and consumer authentication all run against pre-built indexes, swapped in atomically when configuration changes. A request through the 30,000th proxy costs the same few hash lookups as one through the first, and each wave of new configuration goes live through an atomic swap, without a restart. The scale job runs authentication and access control on every request, with the load generator on the same runner as the gateway.
From Scheduled Scaling Regression run 44885907753 at commit 3c1ced007. Data: scale.json.
Run It Yourself
Don't take our word for it. Fork ferrum-edge/ferrum-edge and dispatch the Gateways Protocol Benchmark workflow from the Actions tab, or run one protocol on a Linux host with a running Docker daemon, a Rust toolchain, protoc, lsof, curl and python3 (the runner builds its load generator and backend natively). The repository's .cargo/config.toml links native builds with clang + mold on GNU/Linux and lld on macOS; ./scripts/install-build-deps.sh installs them (Homebrew, apt or dnf), or see building without fast linkers. The harness is source available under the repository's PolyForm Noncommercial or a commercial license.
git clone https://github.com/ferrum-edge/ferrum-edge.git
cd ferrum-edge
git checkout --detach c855065d70a0528a6d5fae59792b3c6399210be9
# One protocol, every gateway that supports it, all five payload sizes
bash tests/performance/multi_protocol/run_gateway_protocol_bench.sh http3 \
--duration 30 --concurrency 100 --output-dir results/http3/run_1
# Per-gateway JSON lands in results/http3/run_1/<gateway>_http3_<bytes>.json
| Workflow | What it measures |
|---|---|
| Gateways Protocol Benchmark (Daily) | Dispatches the full eight-protocol matrix against main once a day |
| Gateways Protocol Benchmark | The protocol × payload × gateway matrix on this page |
| Gateway Comparison Benchmark | HTTP, HTTPS, end-to-end TLS and key-auth throughput, all gateways in Docker (Gateway Comparisons) |
| Scheduled Scaling Regression | 30,000-proxy scale on SQLite, PostgreSQL and MongoDB, plus a 10,000-proxy load-stress run |