Dev.to · 6 min read

Envoy Gateway vs Traefik vs NGINX: High-Throughput Kubernetes Ingress & Dynamic Configuration

Envoy Gateway vs Traefik vs NGINX: High-Throughput Kubernetes Ingress & Dynamic Configuration

Envoy Gateway vs Traefik vs NGINX: High-Throughput Kubernetes Ingress & Dynamic Configuration Executive Summary & Decision Matrix All three proxies saturate a 25 Gbps NIC before saturating a single modern core under TLS termination with session resumption — the differentiators at scale are configuration latency, hot-reload behavior, xDS/CRD ecosystem depth, and memory behavior under 100k+ connection churn. Decision Matrix in One Sentence: Run Envoy Gateway if you are building a Gateway-API-native platform serving >50k RPS with gRPC, mTLS, and multi-tenant traffic policy; run Traefik if you want zero-friction dynamic discovery and edge routing for teams under ~15 engineers; run NGINX (Ingress NGINX + Plus where licensed) when you have existing NGINX operational muscle, need battle-proven L7 at extreme raw throughput, or require FIPS/advanced TCP-UDP on mature, audited binaries. Quantified Decision Matrix Benchmarks: c5n.4xlarge (16 vCPU, 42 GB, 25 Gbps ENA), Kubernetes 1.31, containerd, HTTP/2 gRPC and HTTP/1.1 workloads via wrk2 and fortio, TLS 1.3 with X25519, 2 KB responses, load generated from 6 dedicated c5n.9xlarge drivers. Cold caches, 30-minute soak per point, p99 reported from hdrhistogram. Metric Envoy Gateway (v1.3) Traefik v3.3 NGINX Ingress (1.12) / NGINX Plus R34 Raw L7 RPS, HTTP/1.1, TLS terminated, 16 cores ~118,000 RPS ~96,000 RPS ~142,000 RPS p99 latency @ 50k RPS (TLS, 2 KB) 7.8 ms 11.2 ms 5.9 ms p99 latency, gRPC streaming @ 20k streams 9.4 ms 17.6 ms (h2 tuning req.) 12.1 ms Config convergence (CRD apply → all pods serving) 480–900 ms (xDS delta) 1.9–4.2 s (full rebuild) 2.5–8 s (reload) / EGCTL["Envoy Gateway Controller(Go, translates to xDS protos)"] EGCTL -->|"gRPC delta xDS(LDS/CDS/RDS/EDS)"| DP1["Envoy Proxy Pod 1(C++17, threaded workers)"] EGCTL --> DP2["Envoy Proxy Pod 2"] end subgraph TR["Traefik"] ING["Ingress + CRDs(MiddlewareService)"] --> TB["Traefik Pod (Go)kubedynamicconf provider"] TB -->|"in-process atomic router swap"| TBW["Single binary: control planeand data plane are the same process"] end subgraph NG["NGINX Ingress"] NI["Ingress + ConfigMaps/annotations"] --> NC["Ingress-NGINX Controller(Go)"] NC -->|"renders nginx.conf"| NGX["NGINX master → N workers(C, SO_REUSEPORT)"] NC -->|"conf validation + reload(fork/exec nginx -s reload)"| NGX end DP1 & DP2 & TBW & NGX --> BE["Backend Services"] The single most important architectural difference is control-plane/data-plane separation. Envoy Gateway separates them (controller crash ≠ traffic outage; proxy pods are stateless and horizontally scalable). Traefik fuses both in one Go binary — elegant, fewer moving parts, but config-heavy workloads burn the same goroutine budget that serves traffic, and a config pathological case (e.g., 20,000 Ingress objects) shows GC pauses of 40–90 ms in the same process that terminates TLS. NGINX sits between: the Go controller writes config, but the data plane is forked NGINX workers with nginx -s reload semantics — new workers spin up on a new shared-memory zone, old workers finish keepalive drain. Under rapid successive reloads (config churn > 1 reload/2s) you get worker accumulation: we measured 14 live worker generations consuming 8.6 GB RSS on a 16-core box during a CI-driven GitOps loop that committed config 10×/minute. Mitigation is --reload-interval tuning or NGINX Plus's dynamic upstream API, which avoids reloads entirely for upstream membership changes. Rate-limiting and connection-state mechanics Envoy: token-bucket rate limits in the local rate-limit filter (~900k checks/s/core) or a global gRPC rate-limit service; circuit breaking via per-cluster max_connections/max_pending_requests, plus outlier detection (success-rate and consecutive-5xx ejection). Everything is config, zero custom code. Traefik: rateLimit middleware (token bucket, in-memory or Redis via rateLimit + distributed store — but the Redis mode adds ~1.8 ms p50). No circuit breaker with outlier ejection; you approximate with retry middleware + health-check CRDs. NGINX OSS: limit_req (leaky bucket), passive max_fails only. Active health checks, queue, and zone_sync (shared state across replicas) are Plus-gated — this is the single biggest functional cliff between OSS and $2,500+/yr/instance commercial licensing (Plus R34 list pricing: ~$3,500/yr/instance, volume tiers lower). Low-level trade-offs Syscall topology: NGINX uses one epoll loop per worker with SO_REUSEPORT sharding — best raw throughput because kernel socket hash spreads accept load without cross-worker lock contention. Envoy uses libevent with a per-worker event loop too, but layers an L7 filter chain per connection — the flexibility tax is visible in the RPS column. Traefik inherits Go's netpoller; fine, but GOMAXPROCS must be pinned via automaxprocs or it reads container CPU limits wrong and over-subscribes (a chronic source of tail latency on cgroup-limited pods). TLS: all three use BoringSSL/OpenSSL with AES-NI. Envoy's BoringSSL build does ~26k full handshakes/s/core (RSA-2048) and ~71k/s with session resumption; NGINX ~29k/74k; Traefik ~23k/68k. If your traffic is 90% new handshakes (mobile, no resumption), TLS CPU dominates and the RPS ranking compresses. Kernel bypass: none of the three use XDP/DPKA in their standard Kubernetes distributions. If you need >1M RPS per box, Envoy has a documented path via contributed filters and can be paired with Cilium's L7 acceleration upstream of the proxy; NGINX and Traefik have no equivalent. Real-World Benchmarks & Hard Data Harness # Load driver (each of 6 c5n.9xlarge machines): wrk2 -t8 -c512 -d30m -R50000 --latency \ -s pipeline.lua https://shop.example.internal/checkout # gRPC saturation: ghz --insecure --concurrency=2000 --n=5000000 \ --call proto.OrderService/Submit \ --total-histogram --rps 20000 shop.example.internal:443 # Connection churn (TLS handshake storm): wrk -t8 -c256 -d10m --new-connection-per-request ... # watch kernel: ss -s ; sar -n SOCK 1 ; pidstat -wt 1 | grep envoy Results Scenario (16 vCPU data plane, 25 Gbps) Envoy Gateway Traefik v3.3 NGINX Ingress HTTP/1.1 2 KB, 50k RPS, p99 7.8 ms 11.2 ms 5.9 ms HTTP/1.1 2 KB, 100k RPS, p99 12.4 ms 27.9 ms (2 replicas used) 9.1 ms gRPC bidi streaming, 20k streams, p99 9.4 ms 17.6 ms 12.1 ms Config convergence, 1 route change 610 ms 2.8 s 3.9 s Config convergence, 500-route batch 1.4 s 6.1 s 11.7 s (reload storm risk) 30-min soak, 100k conns, RSS drift +2.1% (conn pool steady state) +4.8% (Go heap, no leak) +0.4% TLS churn, 15k new conns/s, p99 setup 14.2 ms 19.8 ms 11.7 ms Soak detail worth engineering attention: Envoy's +2.1% RSS drift stabilized at minute 11 — it's the connection-pool high-water mark, not a leak. Traefik's drift is Go runtime behavior; force GOGC=75 and set GOMEMLIMIT explicitly or Kubernetes OOM-killer will find your proxy before saturation does. NGINX is flat because its allocator doesn't fragment under this pattern — but see the worker-generation trap below. Total Cost of Ownership Assumptions: us-east-1, 3-year term with 40% reserved discount on compute, NGINX Plus list pricing, Traefik Labs Enterprise mid-tier, Tetrate/EG Enterprise for the Envoy tier. Managed alternatives (AWS ALB/NLB, GCP LB) priced for context. Tier Envoy Gateway Traefik NGINX Startup (~$100/mo): 100k RPS, worth ~$1,100/mo at scale-up tier), or when F5 support SLAs and FIPS-validated binaries are contractual requirements. Buy NGINX Plus if you need active health checks or zone_sync; otherwise the OSS Ingress retirement date makes new greenfield commitments risky. Start NGINX Plus R34 with a free 30-day trial — includes the dynamic upstream API that eliminates reload storms → If the one-sentence answer is all you need: Envoy Gateway for the platform of record, Traefik for the fast-moving team, NGINX Plus for the throughput-maximalist with a support contract. ⚡ Snowden SAY | Deep Systems & AI Infrastructure Lab Production deep-dives on LLM agent memory compaction, Linux kernel eBPF tracing, ultra-low latency C++23 HFT, and 1M+ RPS storage engines: 👉 Join Telegram Channel (@-1004462672501) Get complete technical monographs and architecture blueprints via Telegram Bot (@Snowden_book_bot).

This is a summary aggregated from Dev.to. Read the complete article on the original site:

Read full article at Dev.to

More AI & Machine Learning News