Originally published on Naveed Ahmed's Engineering Blog.
Choosing a reverse proxy is no longer just a question of raw HTTP performance.
Your team also needs to think about certificate management, configuration changes, container discovery, Kubernetes integration, and the cost of operating the gateway over time.
Caddy, NGINX, and Traefik approach these problems differently.
1. The Quick Comparison
| Category | Caddy | NGINX | Traefik |
|---|---|---|---|
| Configuration | Caddyfile / JSON | nginx.conf | YAML / labels / providers |
| Automatic HTTPS | Built in | External tooling typically needed | Built-in ACME |
| Docker discovery | Integrations available | Integrations available | Native Docker provider |
| Kubernetes | Controller integrations | Depends on controller product | IngressRoute, Ingress, Gateway API |
| Main strength | Simplicity | Flexibility | Dynamic routing |
2. Caddy: Automatic HTTPS With Less Configuration
For a basic application, a Caddyfile can be very short:
app.example.com {
reverse_proxy 127.0.0.1:8080
}
With valid DNS and reachable certificate-challenge endpoints, Caddy can manage publicly trusted HTTPS certificates automatically.
That makes it appealing for small teams and straightforward service deployments.
Its simplicity doesn't eliminate the need for logging, backend security, storage planning, or proper production testing.
3. NGINX: Detailed Control
NGINX uses a structured configuration format.
A basic reverse proxy can look like this:
server {
listen 80;
server_name app.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
This example uses HTTP only to demonstrate routing.
A real public deployment should include an appropriate HTTPS setup.
NGINX provides extensive capabilities for proxy configuration, caching, upstream management, and request handling.
For established Linux environments, that flexibility can be valuable.
4. Traefik: Container Discovery
Traefik has native integrations for discovering container services.
In Docker Compose, labels can define the routing rules:
services:
app:
image: example/app:1.0
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`app.example.com`)"
- "traefik.http.routers.app.entrypoints=websecure"
- "traefik.http.services.app.loadbalancer.server.port=8080"
This is only the application-side routing configuration.
A working HTTPS deployment also needs a properly configured Traefik service, Docker provider, TLS handling, network attachment, and entry point.
Because the Docker provider requires access to container metadata, secure how it connects to the Docker API.
5. Kubernetes Changes the Decision
Traefik supports Kubernetes routing providers and custom resources, including IngressRoute.
NGINX-based ingress remains a product category, but controller implementations must be distinguished.
In particular, the community Kubernetes ingress-nginx project announced retirement in March 2026. It should not be confused with the independently maintained NGINX web server or F5 NGINX Ingress Controller.
For new cluster deployments, also evaluate Kubernetes Gateway API.
The most appropriate controller depends on support status, migration needs, traffic policies, and team experience.
6. What About Performance?
Your own workload matters more than a generic leaderboard.
A useful benchmark should control:
- Proxy versions and configuration
- TLS settings
- Keep-alive and connection reuse
- Backend latency
- Request size and concurrency
- CPU and memory limits
- Test generator capacity
- P95/P99 latency and error rates
Don't treat a synthetic requests-per-second result as proof of superior application performance in every environment.
Which One Would I Choose?
Caddy: A small application stack where automatic HTTPS and simplicity matter most.
NGINX: Established Linux or API gateway environments that benefit from detailed proxy controls.
Traefik: Docker or Kubernetes environments with frequent service changes and declarative routing.
None is universally best.
Complete Architecture and Configuration Comparison
My full article includes a detailed comparison of TLS automation, performance considerations, Caddyfile versus nginx.conf versus Traefik labels, and production deployment trade-offs.
Read Caddy vs NGINX vs Traefik: Reverse Proxy Benchmark & K8s Architecture
Which reverse proxy are you currently using, and what made you choose it?
Written by Naveed Ahmed — DevOps & Platform Engineering
Top comments (0)