Performance · Gateway Comparisons

Ferrum Edge vs. the Field

Envoy, Kong, Tyk and KrakenD, run side by side with Ferrum Edge on the same CI runner, with the same backend and the same load. Two public benchmarks feed this page: a Docker-based API gateway shoot-out for plain HTTP, TLS and authenticated traffic, and the eight-protocol matrix behind the protocol benchmarks.

2/4
Scenarios where Ferrum Edge posts the highest throughput
3/4
Scenarios where Ferrum Edge has the lowest p99 latency
+13%
Key-auth throughput over the next-fastest gateway
67/67
Ranked protocol × payload cells where Ferrum leads or matches

Every Gateway in Docker, One at a Time

Same box, same rules

The Gateway Comparison Benchmark runs on a GitHub-hosted ubuntu-26.04 runner. Ferrum Edge is built into an image from the tested commit; the others use their official images. Gateways run one after another with host networking, so none competes with another for CPU.

A realistic request

wrk sends a roughly 10 KB JSON POST to /api/echo and the backend echoes it back, so every request carries a body in both directions. Each test gets a warm-up that isn't counted, then a measured run.

Four scenarios

HTTP (plaintext), HTTPS (TLS ends at the gateway), end-to-end TLS (the gateway re-encrypts to a TLS backend) and key auth (an API key checked on every request). KrakenD CE is left out of key auth because that plugin is Enterprise-only.

Full Benchmark Table

Requests per second and p99 latency, ~10 KB JSON echo. Orange marks the fastest gateway in each column. See the methodology for how the runs are set up.

GatewayHTTPHTTPS (TLS at the gateway)End-to-end TLSHTTP + key auth
Ferrum Edge54,621
p99 4.0 ms
44,528
p99 4.8 ms
37,333
p99 6.0 ms
51,964
p99 4.2 ms
Envoy 1.39-latest50,027
p99 4.3 ms
45,421
p99 4.8 ms
40,584
p99 5.6 ms
45,681
p99 4.5 ms
Kong 3.1649,700
p99 5.2 ms
42,301
p99 6.8 ms
35,980
p99 8.5 ms
39,783
p99 8.5 ms
Tyk v5.1515,272
p99 22.4 ms
14,340
p99 24.4 ms
13,492
p99 25.4 ms
12,246
p99 29.0 ms
KrakenD 2.13.1115,600
p99 20.4 ms
14,531
p99 23.2 ms
13,611
p99 25.2 ms
—
Direct (no gateway)158,786
p99 2.9 ms
118,003
p99 3.2 ms
116,449
p99 3.1 ms
—

Authenticated Traffic

Real APIs authenticate. Each request carries an apikey header that the gateway checks against a configured consumer before proxying. Envoy's check is an inline Lua filter, Kong's and Tyk's are their built-in key-auth plugins, and Ferrum's is the compiled key_auth plugin.

Key-auth req/s (higher is better)
Ferrum Edge
51,964 req/s
Envoy
45,681 req/s
Kong
39,783 req/s
Tyk
12,246 req/s

Ferrum Edge vs the Closest Competitor

How far Ferrum Edge is ahead of the fastest other gateway in each scenario, measured in the same run. A minus sign means that gateway is ahead.

ScenarioClosest competitorFerrum throughputFerrum p99
HTTPEnvoy+9%7% lower
HTTPS (TLS at the gateway)Envoy−2%1% lower
End-to-end TLSEnvoy−8%7% higher
HTTP + key authEnvoy+14%8% lower

Beyond HTTP/1.1

The protocol matrix also measures HTTP/2, HTTP/3, gRPC, WebSocket, TCP and UDP, with every gateway that proxies each protocol end to end, at payloads from 10 KB to 5 MB (UDP uses 1 KB datagrams). Each row shows Ferrum's lead over the fastest other gateway at each payload size, as the median across ranked sizes. Full protocol results →

ProtocolClosest competitorFerrum throughputFerrum p99
HTTP/1.1 + TLSEnvoy+13%5% lower
HTTP/2Envoy+30%36% lower
HTTP/3 (QUIC)Envoy+171%66% lower
gRPC (TLS)Envoy+14%33% lower
WebSocket (TLS)Envoy+13%11% lower
TCP + TLSEnvoy+9%9% lower
UDPKong+12%44% lower

Under the Hood

Pre-Computed ConsumerIndex

Credentials are indexed into per-type HashMaps at config load time. Every authenticated request pays a single O(1) HashMap lookup, with no runtime parsing and no deep clone of the consumer.

Arc<Consumer> Zero-Copy

The index holds each consumer as an Arc<Consumer>, so attaching the authenticated identity to a request is an atomic reference-count bump, not a copy.

rustls + Connection Pooling

Ferrum uses rustls (with the ring crypto provider by default, AWS-LC in the FIPS build) for both inbound and outbound TLS. Connection pools keep established TLS connections to backends warm, so sustained end-to-end TLS traffic rarely pays for a new handshake.

Lock-Free Config Reads

ArcSwap::load() for the configuration and route-table snapshots is a single atomic pointer load — no mutex, no spinlock — so a reload never stalls a request. The route lookup cache is a sharded DashMap, so a cache hit takes one short per-shard read lock rather than being lock-free.

Pre-Computed Header Names

The key_auth plugin lowercases the configured header name once when configuration loads, so the request path does no per-request normalization of it.

Compiled Rust vs Scripting

Every Ferrum plugin is compiled Rust, with no interpreter on the request path. In this benchmark Envoy's key check is an inline Lua filter, Kong's plugins run on OpenResty's Lua runtime, and Tyk's middleware is Go.

Run the Comparison Yourself

Dispatch the Gateway Comparison Benchmark from the Actions tab of your fork, or run it on any Linux or macOS machine with Docker. The benchmark harness is source available under the repository's PolyForm Noncommercial or a commercial license.

You need Bash and Git plus wrk, python3, a Rust cargo toolchain, curl, docker with a running daemon, and lsof. Cargo builds the native echo backend; Docker builds Ferrum Edge and pulls Kong, Tyk, KrakenD and Envoy. 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.

bash

git clone https://github.com/ferrum-edge/ferrum-edge.git
cd ferrum-edge
git checkout --detach c855065d70a0528a6d5fae59792b3c6399210be9
# Ferrum Edge, Kong, Tyk, KrakenD and Envoy, all in Docker
./comparison/run_comparison.sh
# HTML report (macOS; use xdg-open on Linux)
open comparison/results/comparison_report.html
ℹ️
Ports 3001, 3443, 8000 and 8443 must be free. Skip gateways with SKIP_GATEWAYS=tyk,krakend ./comparison/run_comparison.sh, and set WRK_DURATION, WRK_THREADS or WRK_CONNECTIONS to change the load. On Linux, open the report with xdg-open comparison/results/comparison_report.html. Docker Desktop on macOS adds its own networking overhead, so compare gaps between gateways there rather than raw req/s.

Provenance

Gateway table: Gateway Comparison Benchmark run 45084105735 at commit c855065d7 (3 iterations of 30s with wrk, 100 connections, 8 threads; Kong Docker 3.16, Tyk Docker v5.15, KrakenD Docker 2.13.11, Envoy Docker 1.39-latest). Protocol table: Gateways Protocol Benchmark run 45084108106. Data: comparison.json · protocols.json.