What Envoy Does
- L7 proxy — HTTP/1.1, HTTP/2, HTTP/3, gRPC
- L4 proxy — TCP, UDP, TLS
- Load balancing — round robin, least request, ring hash, maglev
- Service discovery — DNS, EDS (Endpoint Discovery Service)
- Health checking — active and passive
- Circuit breaking — per-upstream limits
- Rate limiting — local and global
- Observability — stats (Prometheus), tracing (Jaeger/Zipkin), access logs
- TLS — termination and origination, mTLS
- xDS API — dynamic configuration via control plane
- WASM filters — extend Envoy with WebAssembly
Architecture
Single-process, multi-threaded C++ binary. Listeners accept connections, filter chains process them, clusters route to upstreams. xDS APIs (LDS, RDS, CDS, EDS, SDS) allow dynamic configuration from a control plane (like Istio or custom gRPC services). Hot restart enables zero-downtime upgrades.
Self-Hosting
# docker-compose.yml
version: "3"
services:
envoy:
image: envoyproxy/envoy:v1.31-latest
ports:
- "10000:10000"
- "9901:9901"
volumes:
- ./envoy.yaml:/etc/envoy/envoy.yamlKey Features
- L4/L7 proxying
- HTTP/2 and gRPC native
- Dynamic configuration (xDS)
- Service discovery
- Circuit breaking and rate limiting
- Observability (stats, tracing, logging)
- mTLS
- WASM filter extensibility
- Hot restart
- Admin API
Comparison
| Proxy | Type | Config | Language |
|---|---|---|---|
| Envoy | L4/L7 | xDS API | C++ |
| Nginx | L4/L7 | Static files | C |
| HAProxy | L4/L7 | Static files | C |
| Traefik | L7 | Auto-discovery | Go |
| Caddy | L7 | Caddyfile/API | Go |
| Linkerd2-proxy | L4/L7 (sidecar) | Control plane | Rust |
FAQ
Q: Envoy vs Nginx? A: Nginx excels at static files + simple reverse proxying (simple config); Envoy excels at microservice scenarios (dynamic config, gRPC, observability, service mesh). Many projects use Nginx at the edge and Envoy for service-to-service proxying.
Q: Relationship with Istio? A: Istio is the control plane; Envoy is the data plane. Istio pushes routing rules and mTLS certificates to each pod's Envoy sidecar via the xDS API.
Q: WASM extensions? A: Write WASM filters in Rust/C++/Go/TinyGo to extend Envoy functionality (custom header modification, auth, rate-limiting logic) without recompiling Envoy.
Sources
- Docs: https://www.envoyproxy.io/docs
- GitHub: https://github.com/envoyproxy/envoy
- License: Apache 2.0