How Envoy Proxy Works

Advanced

Envoy is a high-performance Layer 7 proxy designed for cloud-native systems and the data plane of most service meshes. It handles traffic between services with rich features — load balancing, retries, timeouts, circuit breaking, mTLS, and deep observability — all applied consistently and configurable at runtime. Its defining trait is dynamic configuration via the xDS APIs: a control plane pushes updates to Envoy live, without restarts, which is what makes service meshes possible.

Think of a smart, reprogrammable traffic controller

A basic traffic light follows a fixed timer. Envoy is a smart traffic controller at every intersection that can be reprogrammed live from a central office (the control plane) — rerouting cars, adding lanes, retrying a blocked turn, and recording detailed traffic stats — all without ever stopping traffic to reconfigure. Place one at every intersection (as a sidecar) and the whole city network becomes observable and centrally controllable in real time.

Step by Step

1 / 5

Key Concepts

Listeners and Filters

A listener accepts connections on a port; filter chains process each request — handling auth, rate limiting, routing, and transformations. This modular pipeline is how Envoy applies L7 logic.

Clusters

Named groups of upstream hosts Envoy sends traffic to. Envoy load-balances across them and applies health checks, retries, timeouts, and circuit breaking per cluster.

xDS Dynamic Configuration

The set of discovery APIs (LDS, RDS, CDS, EDS) through which a control plane pushes configuration to Envoy at runtime — the mechanism that lets meshes update routing and policy without restarts.

Data Plane Sidecar

Envoy runs alongside each service, intercepting its traffic. As the data plane of a service mesh, it enforces security, traffic management, and observability configured centrally by the control plane.

Key Facts

  • Envoy is the data plane behind most service meshes (including Istio) precisely because of xDS — it can be reconfigured live by a control plane without restarts.
  • As an L7 proxy it offers advanced traffic features (retries, circuit breaking, request-level routing) and first-class observability out of the box.
  • Nginx and Envoy overlap as proxies, but Envoy dynamic xDS config and cloud-native, per-request features make it the standard mesh sidecar.

Real-World Applications

Service mesh sidecar

In an Istio mesh, an Envoy sidecar next to each pod enforces mTLS, applies traffic rules (canary splits, retries), and emits detailed metrics and traces — all pushed to it dynamically by the mesh control plane.

API edge gateway

Envoy fronts a set of services as an edge gateway, terminating TLS, routing by path and header, rate limiting, and load balancing across backends, with configuration updated live from a control plane.

Frequently Asked Questions

What is Envoy proxy?

Envoy is a high-performance Layer 7 (application-layer) proxy built for cloud-native systems. It sits between services and manages their traffic with features like load balancing, retries, timeouts, circuit breaking, mutual TLS, and rich observability. Its standout capability is dynamic configuration through the xDS APIs, which lets a control plane update its behaviour at runtime without restarts — the reason Envoy is the data plane of most service meshes.

What is xDS in Envoy?

xDS is the family of discovery APIs (such as LDS for listeners, RDS for routes, CDS for clusters, and EDS for endpoints) that Envoy uses to fetch its configuration dynamically from a control plane. Instead of reading static config files, Envoy subscribes to these APIs, and the control plane pushes updates live. This is what allows routing, policy, and endpoints to change on the fly without restarting the proxy — the foundation of service mesh functionality.

What are listeners and clusters in Envoy?

A listener is an entry point: it binds to a port, accepts incoming connections, and passes requests through a chain of filters that handle things like authentication, rate limiting, and routing. A cluster is a named group of upstream hosts that Envoy can send traffic to; Envoy load-balances across the cluster members and applies health checks, retries, timeouts, and circuit breaking. Together, listeners define how traffic comes in and clusters define where it goes.

What is the difference between Envoy and Nginx?

Both are high-performance proxies with overlapping features like reverse proxying and load balancing. The key difference is that Envoy is designed for cloud-native, dynamic environments: it supports live reconfiguration via the xDS APIs, offers rich per-request L7 features (retries, circuit breaking, detailed metrics/tracing) out of the box, and is the standard sidecar in service meshes. Nginx is a mature, versatile web server and proxy, often configured more statically. For service meshes and dynamic microservice traffic, Envoy is typically chosen.

Related Topics