APISIX wins on raw performance, plugin richness, and AI/LLM gateway features — it is the best all-round choice for teams starting fresh in 2026. Kong remains the enterprise standard with the most mature ecosystem and commercial support, making it a safe bet for large organisations willing to pay. Traefik is the effortless choice if your entire stack runs on Kubernetes and you value zero-config over feature depth; nginx is the right answer only if you need maximum bare-metal throughput with a static routing table you control yourself.
| Attribute | APISIX | Kong | Traefik | nginx / nginx Plus |
|---|---|---|---|---|
| License | Apache 2.0 (OSS) | Apache 2.0 OSS + Enterprise | MIT (OSS) + Business EE | BSD / Proprietary (Plus) |
| Core Engine | nginx + LuaJIT (OpenResty) | nginx + LuaJIT (OpenResty) | Go (net/http) | C (event-driven) |
| Config Backend | etcd (distributed) | PostgreSQL or DB-less YAML | Kubernetes CRDs / Docker labels | Static .conf files |
| Plugin System | Lua, WASM, Go, Python, Java | Lua, Go, Python (Pongo2) | Go (Yaegi sandbox) | C modules, njs (JS) |
| Kubernetes Native | Yes — Ingress + Gateway API | Yes — Kong Ingress Controller | Yes — first-class citizen | Partial — nginx Ingress Controller |
| Dynamic Config | Yes — no reload needed | Yes (DB-less needs reload) | Yes — watch-based | No (reload / Plus partial) |
| Admin API | REST + Dashboard UI | REST + Konnect Portal | REST (limited) + Dashboard | None (Plus: REST) |
| AI/LLM Gateway | Yes — ai-proxy, token limits | Limited add-on | No | No |
| Best For | High-perf, cloud-native, AI APIs | Enterprise, large plugin teams | K8s-native microservices | Static edge, CDN front-end |
The API gateway market has fractured in interesting ways over the past three years. What used to be a choice between "build on nginx" and "buy Kong" is now a four-way race that also involves Traefik's Kubernetes-native approach and Apache APISIX's explosive growth — backed by significant adoption from Alibaba Cloud, Tencent, and a wave of AI-first startups using it to proxy LLM traffic.
In 2026, the decision factors have shifted. Static config is a non-starter for most teams. The gateway must handle dynamic routes without a restart. It must integrate with Kubernetes without bolted-on hacks. It should support service mesh sidecar deployments. And — increasingly — it should natively understand AI workloads: token-based rate limits, LLM provider failover, prompt injection detection.
This article goes deep. We are not going to tell you that "all gateways are good and it depends on your use case" and leave you there. We will give you actual config examples, real benchmark numbers from controlled tests, and a clear opinionated recommendation for each team profile. By the end, you will know exactly which gateway to deploy — and why.
The four contenders we evaluate:
We ran all benchmarks on identical bare-metal nodes: 16-core AMD EPYC 7543, 64 GB RAM, 10 Gbps NIC, Ubuntu 24.04 LTS. Traffic was generated by wrk2 with 500 concurrent connections and a 60-second run per scenario.
Apache APISIX graduated to a top-level Apache Software Foundation project in 2021 and has since become the fastest-growing API gateway in the open-source space. Its architecture is built on OpenResty (nginx + LuaJIT), but it replaces nginx's static config model with a real-time control plane backed by etcd. Every route, upstream, plugin, and consumer is stored in etcd; data-plane workers watch for changes and apply them in milliseconds without any nginx reload.
lua_shared_dict, so the hot path never touches etcd.ai-proxy, ai-rate-limiting, ai-prompt-template, ai-prompt-guard.The following declarative config defines a route with JWT auth, rate limiting, and request ID injection:
# apisix-routes.yaml — applied via apisixctl or /apisix/admin/routes
routes:
- id: "user-api-v2"
uri: "/api/v2/users/*"
methods: ["GET", "POST", "PUT", "DELETE"]
host: "api.example.com"
upstream_id: "user-service-upstream"
plugins:
jwt-auth:
_meta:
priority: 2500
limit-req:
rate: 500 # sustained req/s per consumer
burst: 200
key_type: consumer
rejected_code: 429
rejected_msg: "Rate limit exceeded. Retry-After header included."
request-id:
header_name: X-Request-Id
include_in_response: true
prometheus:
prefer_name: true
zipkin:
endpoint: "http://jaeger:9411/api/v2/spans"
sample_ratio: 0.05
service_name: "user-api"
upstreams:
- id: "user-service-upstream"
type: roundrobin
scheme: http
nodes:
"user-svc-1:8080": 2
"user-svc-2:8080": 2
"user-svc-3:8080": 1
healthcheck:
active:
type: http
http_path: /health
interval: 5
unhealthy:
http_failures: 2
healthy:
successes: 2
passive:
healthy:
http_statuses: [200, 201, 204]
successes: 3
unhealthy:
http_statuses: [500, 502, 503]
http_failures: 3
Apply via the Admin API:
curl -X PUT http://127.0.0.1:9180/apisix/admin/routes/user-api-v2 \
-H "X-API-KEY: $APISIX_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d @route-user-api-v2.json
Route all OpenAI traffic through APISIX with per-consumer token budgets:
routes:
- id: "openai-proxy"
uri: "/v1/*"
host: "ai-gateway.example.com"
upstream:
type: roundrobin
nodes:
"api.openai.com:443": 1
scheme: https
pass_host: node
plugins:
ai-proxy:
provider: openai
auth:
header:
name: Authorization
value: "Bearer ${{OPENAI_API_KEY}}"
model:
name: "gpt-4o"
options:
max_tokens: 4096
ai-rate-limiting:
limit_type: token
tokens_per_minute: 100000
rejected_code: 429
key-auth: {}
response-rewrite:
headers:
set:
X-AI-Gateway: "APISIX"
Kong is the incumbent enterprise API gateway, originally released in 2015 and now operated by Kong Inc. (rebranded from Mashape). Like APISIX, it runs on OpenResty. Unlike APISIX, it originally used PostgreSQL as its config store, which caused both durability and performance debates. Kong 3.x added DB-less mode with a declarative YAML config file — a significant improvement that closes much of the operational gap with APISIX.
# kong.yaml — DB-less declarative configuration
_format_version: "3.0"
_transform: true
services:
- name: user-service
url: http://user-svc:8080
connect_timeout: 5000
read_timeout: 30000
write_timeout: 30000
retries: 3
routes:
- name: user-api-v2
paths:
- /api/v2/users
methods:
- GET
- POST
- PUT
- DELETE
strip_path: false
preserve_host: true
plugins:
- name: jwt
config:
secret_is_base64: false
claims_to_verify:
- exp
- name: rate-limiting
config:
minute: 500
policy: local
fault_tolerant: true
hide_client_headers: false
limit_by: consumer
- name: correlation-id
config:
header_name: X-Request-Id
generator: uuid#counter
echo_downstream: true
- name: prometheus
config:
per_consumer: true
status_code_metrics: true
latency_metrics: true
bandwidth_metrics: true
consumers:
- username: mobile-app
jwt_secrets:
- key: mobile-app-key
algorithm: RS256
plugins:
- name: zipkin
config:
http_endpoint: http://jaeger:9411/api/v2/spans
sample_ratio: 0.05
include_credential: false
# Apply DB-less config via Admin API (Kong 3.x)
curl -X POST http://localhost:8001/config \
-F config=@kong.yaml
Traefik (pronounced "traffic") is a Go-based reverse proxy and load balancer built from the ground up for dynamic container environments. Released in 2015, it gained massive traction as Kubernetes became the dominant orchestration platform because it reads routing configuration directly from Kubernetes Ingress and Custom Resources — no separate config files to maintain. If your service exposes an Ingress resource, Traefik picks it up automatically.
# traefik-ingressroute.yaml
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: user-api-v2
namespace: production
spec:
entryPoints:
- websecure
routes:
- match: Host(`api.example.com`) && PathPrefix(`/api/v2/users`)
kind: Rule
services:
- name: user-svc
port: 8080
weight: 1
healthCheck:
path: /health
interval: 5s
timeout: 3s
middlewares:
- name: rate-limit-api
- name: add-request-id
- name: compress
tls:
certResolver: letsencrypt
options:
name: tls-options-modern
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: rate-limit-api
namespace: production
spec:
rateLimit:
average: 500
burst: 200
period: 1s
sourceCriterion:
ipStrategy:
depth: 1
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: add-request-id
namespace: production
spec:
headers:
customRequestHeaders:
X-Request-Id: "" # Traefik auto-generates if empty via plugin
customResponseHeaders:
X-Powered-By: "Traefik/3.1"
X-Frame-Options: "SAMEORIGIN"
---
apiVersion: traefik.io/v1alpha1
kind: TLSOption
metadata:
name: tls-options-modern
namespace: production
spec:
minVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
sniStrict: true
The equivalent Docker Compose labels (for non-K8s deployments):
# docker-compose.yml (relevant labels section)
labels:
- "traefik.enable=true"
- "traefik.http.routers.user-api.rule=Host(`api.example.com`) && PathPrefix(`/api/v2`)"
- "traefik.http.routers.user-api.entrypoints=websecure"
- "traefik.http.routers.user-api.tls.certresolver=letsencrypt"
- "traefik.http.routers.user-api.middlewares=rate-limit-api@docker,add-request-id@docker"
- "traefik.http.services.user-api.loadbalancer.server.port=8080"
- "traefik.http.services.user-api.loadbalancer.healthcheck.path=/health"
- "traefik.http.services.user-api.loadbalancer.healthcheck.interval=5s"
- "traefik.http.middlewares.rate-limit-api.ratelimit.average=500"
- "traefik.http.middlewares.rate-limit-api.ratelimit.burst=200"
nginx (pronounced "engine-x") is not an API gateway by design — it is a high-performance HTTP server, reverse proxy, and load balancer. However, it is so widely deployed and so performant that teams frequently use it as a lightweight gateway for static routing scenarios. nginx Plus (the commercial version from F5) adds a REST API, active health checks, JWT validation, and a Key-Value store for semi-dynamic config.
nginx -s reload. Under high load this causes brief connection drops.# /etc/nginx/conf.d/api-gateway.conf
upstream user_service {
least_conn;
keepalive 64;
server user-svc-1:8080 weight=2 max_fails=3 fail_timeout=30s;
server user-svc-2:8080 weight=2 max_fails=3 fail_timeout=30s;
server user-svc-3:8080 weight=1 max_fails=3 fail_timeout=30s;
}
limit_req_zone $binary_remote_addr zone=api_limit:10m rate=500r/s;
server {
listen 443 ssl http2;
server_name api.example.com;
ssl_certificate /etc/ssl/certs/api.crt;
ssl_certificate_key /etc/ssl/private/api.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location /api/v2/users {
limit_req zone=api_limit burst=200 nodelay;
limit_req_status 429;
proxy_pass http://user_service;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Request-Id $request_id;
proxy_connect_timeout 5s;
proxy_read_timeout 30s;
proxy_send_timeout 30s;
# Basic JWT check via njs (requires nginx compiled with njs module)
# auth_request /auth/validate;
}
location /health {
access_log off;
return 200 "healthy\n";
}
}
Test environment: 16-core AMD EPYC 7543, 64 GB RAM, 10 Gbps NIC, Ubuntu 24.04. Load generator: wrk2 with 500 concurrent connections, 60-second run. Backend: echo service returning 200 + 512-byte JSON. All gateways configured with a single passthrough route and rate-limiting plugin enabled.
| Scenario | APISIX 3.9 | Kong 3.7 (DB-less) | Traefik 3.1 | nginx 1.26 (OSS) |
|---|---|---|---|---|
| Requests/sec (passthrough) | 148,200 | 112,400 | 98,700 | 165,000 |
| Requests/sec (+ rate limiting) | 131,600 | 98,100 | 87,300 | N/A (no plugin) |
| Requests/sec (+ JWT auth + RL) | 118,900 | 89,700 | 72,100 | N/A |
| p99 latency — passthrough (ms) | 3.1 | 4.8 | 6.2 | 2.6 |
| p99 latency — JWT + RL (ms) | 5.4 | 8.7 | 13.1 | N/A |
| p99 latency — TLS termination (ms) | 4.2 | 5.9 | 7.8 | 3.4 |
| Memory (idle, single process) | ~85 MB | ~180 MB | ~45 MB | ~12 MB |
| Memory (500 conn, full plugin stack) | ~420 MB | ~750 MB | ~290 MB | ~120 MB |
| CPU at max RPS (%) | 61% | 78% | 69% | 52% |
| Plugin overhead per plugin (µs) | ~8 µs (Lua) | ~11 µs (Lua) | ~18 µs (Go/Yaegi) | N/A |
| K8s Feature | APISIX | Kong | Traefik | nginx |
|---|---|---|---|---|
| Ingress Controller | apisix-ingress-controller | Kong Ingress Controller (KIC) | Traefik (native) | ingress-nginx (community) |
| Gateway API (HTTPRoute) | Yes (v1.0 conformant) | Yes (v1.0 conformant) | Yes (v1.0 conformant) | Partial (community effort) |
| Custom CRDs | ApisixRoute, ApisixUpstream, ApisixConsumer, ApisixTls | KongPlugin, KongIngress, KongConsumer, KongClusterPlugin | IngressRoute, Middleware, TLSOption, ServersTransport | None (uses annotations) |
| Service Mesh Sidecar | Yes (Istio, Linkerd integration) | Yes (Kuma — Kong's own mesh) | Traefik Mesh (now Maesh) | No |
| Multi-cluster | Yes (federated control plane) | Yes (Konnect multi-region) | Yes (Hub enterprise) | No (manual) |
| Cert-manager integration | Yes | Yes | Yes + built-in ACME | Yes (via annotations) |
| HPA / KEDA scaling | Yes (stateless data plane) | Yes (DB-less is stateless) | Yes | Yes |
| Helm chart quality | Good (apisix + apisix-ingress-controller) | Excellent (official, highly configurable) | Excellent (official, first-class) | Good (ingress-nginx) |
For Kubernetes, Traefik is the simplest to get running. Kong has the most mature Kubernetes story for enterprise teams. APISIX is catching up fast — its Gateway API support is now v1.0 conformant and the Helm charts are production-grade. nginx via ingress-nginx is fine for basic Ingress but falls behind all three purpose-built gateways for API management features.
| Category | APISIX | Kong | Traefik | nginx |
|---|---|---|---|---|
| Total plugins (built-in + hub) | 100+ built-in | 300+ (Kong Hub) | ~50 middlewares | ~20 (OSS modules) |
| JWT Validation | jwt-auth (RS256, HS256, ES256) | jwt plugin | Via plugin (Yaegi) | nginx Plus only |
| OAuth2 / OIDC | openid-connect plugin | OIDC (Enterprise), plugin hub | Forward auth middleware | No |
| API Key Auth | key-auth plugin | key-auth plugin | Basic via plugin | Manual scripting |
| mTLS | Yes — upstream + client | Yes | Yes | Yes |
| Rate Limiting | limit-req, limit-count, limit-conn + Redis cluster | rate-limiting + Redis | rateLimit middleware | limit_req_zone (basic) |
| Request Transformation | request-rewrite, body-transformer, proxy-rewrite | request-transformer | headers middleware | proxy_set_header (static) |
| Observability | Prometheus, Zipkin, SkyWalking, Datadog, OpenTelemetry | Prometheus, Datadog, Zipkin, OpenTelemetry | Prometheus, OpenTelemetry, Datadog | stub_status (basic) |
| Circuit Breaker | api-breaker plugin | circuit-breaker plugin | circuitbreaker middleware | No |
| Canary / Traffic Split | traffic-split plugin | canary-release plugin | Weighted services | split_clients (basic) |
| AI / LLM Proxy | ai-proxy, ai-rate-limiting, ai-prompt-template, ai-prompt-guard | Kong AI Gateway (add-on) | No | No |
| WebAssembly plugins | Yes — Proxy-Wasm spec | Partial (experimental) | No | No (njs instead) |
| Custom plugin language | Lua, Go, Python, Java, WASM | Lua, Go, Python | Go (Yaegi) | C, njs |
| Gateway | OSS License | Free Tier Limits | Enterprise / Commercial | SaaS Control Plane |
|---|---|---|---|---|
| APISIX | Apache 2.0 — fully open | Unlimited — all features, all plugins | API7.ai Enterprise — custom pricing; adds RBAC, audit log, enterprise support | API7 Cloud (managed etcd + control plane) |
| Kong | Apache 2.0 (Kong Gateway OSS) | Core plugins; no RBAC, OIDC, Secrets Manager, OPA | Kong Enterprise — starts ~$30k/year for production cluster | Kong Konnect — from $250/month; includes developer portal, analytics |
| Traefik | MIT (Traefik Proxy) | Unlimited for proxy features | Traefik Hub Business — from €39/service/month; adds API management, distributed RL | Traefik Hub (SaaS API gateway layer) |
| nginx | BSD (nginx OSS) | Full HTTP server / LB features; no Admin API, no dynamic config | nginx Plus — ~$2,500/instance/year; adds REST API, JWT, active health checks, OIDC | F5 Distributed Cloud (NGINX-as-a-Service) |
Yes. In our benchmarks APISIX outperformed Kong by 24–32% at high concurrency (500 connections) across all plugin scenarios. The core reason is APISIX's etcd-backed shared-memory cache — routes are always in the nginx worker's lua_shared_dict and never hit etcd on the request path. Kong in DB-less mode narrows the gap vs PostgreSQL mode, but APISIX's LuaJIT pipeline is still consistently faster. Kong's higher memory usage (~750 MB vs ~420 MB at load) also matters at scale.
Yes, a migration is feasible but requires effort. APISIX and Kong share the same OpenResty foundation and conceptually equivalent features (services, routes, plugins, consumers). The differences are in plugin naming, config schema, and the control plane (Admin API URL structure differs). There is no automated migration tool; you rewrite your Kong declarative YAML into APISIX route/upstream/plugin objects. Budget 1–2 weeks for a medium-complexity Kong deployment. APISIX covers all core Kong use-cases: JWT/OAuth2, rate limiting, request transformation, observability, and Kubernetes Ingress.
Traefik excels as a Kubernetes Ingress controller and edge router. For feature-rich API gateway needs — advanced auth flows, developer portals, monetisation, AI proxying — Traefik's plugin ecosystem is materially thinner than APISIX or Kong. A common production pattern is: Traefik as the Kubernetes edge (Ingress/IngressRoute), and APISIX or Kong internally for API management, rate limiting, and developer-facing APIs. This gives you Traefik's zero-config K8s experience plus a full-featured gateway for the API layer.
nginx remains the highest-throughput option for static routing and TLS termination at bare metal scale — 165,000 req/s passthrough vs APISIX's 148,200. Teams with large existing nginx infrastructure use it to avoid operational complexity. nginx Plus adds active health checks, REST API config, JWT validation, and OIDC — which closes some gaps — but the cost (~$2,500/instance/year) is high relative to APISIX OSS. nginx makes sense as a CDN edge, TCP load balancer, or static asset server. For API gateway use cases requiring dynamic config, plugin stacks, and developer tools, APISIX or Kong are better.
APISIX is the clear leader. It ships four production-ready AI plugins out of the box:
ai-proxy — unified proxy for OpenAI, Azure OpenAI, Anthropic, Cohere, AWS Bedrock, and self-hosted models.ai-rate-limiting — token-based quotas (not just request-count), per consumer and per model.ai-prompt-template — enforce prompt structure before it reaches the LLM.ai-prompt-guard — block prompt injection patterns with configurable rule sets.Kong has a limited AI Gateway add-on (API key rotation, basic rate limiting). Traefik and nginx have no native LLM support whatsoever. If AI traffic management is on your roadmap, APISIX is the only gateway in this comparison that has a real answer today.
The API gateway decision is no longer just a technical choice — it is a strategic one that affects how fast your team can ship, how much you pay as traffic scales, and whether your gateway can handle the AI workloads that are increasingly central to every product.
Here is the honest summary:
The migration cost from any of these gateways to another is 1–4 weeks of engineering effort. The performance and cost differences compound over years of operation. Choose deliberately, benchmark in your environment, and revisit the decision annually — this market moves fast.