Envoy Proxy
Envoy is an open-source, high-performance Layer 7 proxy originally built at Lyft. It is the sidecar proxy used by Istio and many other service meshes, handling mTLS, load balancing, retries, circuit breaking, metrics, and tracing for service traffic.
What Envoy is
Envoy runs as a separate process next to an application, so any language benefits without a client library. It understands HTTP, gRPC, and TCP. In Istio, the sidecar container named istio-proxy is Envoy.
Dynamic configuration with xDS
Envoy in a mesh does not read static files. The control plane streams configuration over the xDS APIs, so routes, clusters, endpoints, and certificates update without restarts.
| API | Provides |
|---|---|
| LDS and RDS | Listeners and routes |
| CDS and EDS | Upstream clusters and endpoints |
| SDS | Certificates and keys |
Inspecting Envoy
istioctl proxy-statusistioctl proxy-config routes orders-7d9f8c.productionkubectl exec -n production orders-7d9f8c -c istio-proxy -- \ curl -s localhost:15090/stats/prometheus | grep istio_requests_totalKey metrics include istio_requests_total and istio_request_duration_milliseconds.
Envoy vs Linkerd's proxy
| Envoy | Linkerd proxy | |
|---|---|---|
| Language | C++ | Rust |
| Features | Very rich, WebAssembly extensions | Focused on core use cases |
| Overhead | Higher | Lower |
RememberYou rarely configure Envoy directly. You write Istio resources and Istio generates the Envoy configuration.
Common MistakeAssuming a STALE status in
istioctl proxy-statusis harmless. A stale proxy may apply outdated routes, so investigate control plane connectivity.
Frequently Asked Questions
Why did Istio choose Envoy rather than build its own proxy?
Envoy already offered dynamic configuration through xDS, rich L7 telemetry, and production-grade load balancing. Istio focuses its control plane on translating policy into Envoy configuration.
What is the main gotcha running Envoy as a sidecar?
Per-pod overhead and startup ordering. If the app starts before the sidecar is ready, early outbound calls fail. Native sidecar containers in recent Kubernetes versions address ordering.
Is Envoy only used in Istio?
No. It is also used by Envoy Gateway, Contour, several API gateways, and cloud load balancers, as well as other meshes.