Skip to main content

Real architecture · Senior

Lyft Envoy and the birth of the service mesh

Real production architecture. Key points: service discovery and mesh.

17 min read · Source: Lyft · Content reviewed on October 23, 2026

Short answer

Real production architecture. Key points: service discovery and mesh. Envoy was built at Lyft to move the company's architecture away from a monolith. According to the CNCF announcement, Matt Klein led the team that designed the technology to abstract most of the network complexity away from the developer.

01 · CONTEXT

From monolithic architecture to the network as a problem

Envoy was built at Lyft to move the company's architecture away from a monolith. According to the CNCF announcement, Matt Klein led the team that designed the technology to abstract most of the network complexity away from the developer.

The project's core idea is that the network should be transparent to applications: when network or application problems arise, it should be easy to find the source. The documentation describes Envoy as an application-layer proxy and communication bus for large, modern service-oriented architectures.

The documentation also notes that it is increasingly common for these architectures to use multiple application frameworks and languages.

02 · THE IDEA

One proxy next to each service

Envoy is a standalone process, designed to run alongside every application server. All the Envoys form a transparent communication mesh. Each application sends and receives messages over localhost and does not know the network topology.

  1. The calling service only knows the proxy running next to it and talks to it over localhost.

    Architecture diagram: Mesh of proxies next to the services
    CPCalling service
    NWCaller's proxylocal proxy
    NWDestination's proxy
    CPDestination service
    NWStatistics collector
  2. The caller's proxy carries the call across the network to the destination's proxy, which is part of the same mesh.

    Architecture diagram: Mesh of proxies next to the services
    CPCalling service
    NWCaller's proxy
    NWDestination's proxy
    CPDestination service
    NWStatistics collector
  3. The destination's proxy hands the call to the local application, which also does not need to know the topology.

    Architecture diagram: Mesh of proxies next to the services
    CPCalling service
    NWCaller's proxy
    NWDestination's proxy
    CPDestination service
    NWStatistics collector
  4. The proxies also emit statistics to a collector.

    Architecture diagram: Mesh of proxies next to the services
    CPCalling service
    NWCaller's proxy
    NWDestination's proxy
    CPDestination service
    NWStatistics collectorobservabilidade

According to the CNCF, Envoy is written in C++ for performance reasons, and its out-of-process architecture serves any application, in any language or runtime.

The documentation points to two substantial benefits of this architecture over the traditional library approach: it works with any application language and allows quick deployment and upgrades across the entire infrastructure.

CapacidadeHow Envoy delivers
LinguagensWorks with any application language
UpgradesCan be deployed and upgraded quickly, across the entire infrastructure and transparently
BalanceamentoAdvanced techniques implemented in one place and accessible to any application
StatisticsRobust statistics support for all subsystems

03 · DISCOVERY

Service discovery and dynamic configuration

Envoy can optionally consume a layered set of dynamic configuration APIs for centralized management. The layers bring updates about the hosts of a backend cluster, the clusters themselves, HTTP routing, listening sockets, and cryptographic material.

For a simpler deployment, backend host discovery can be done through DNS resolution. The recommended way to build a mesh, however, is to treat service discovery as an eventually consistent process.

  1. Dynamic configuration reaches the proxy from a central management service.

    Architecture diagram: Discovery and dynamic configuration
    CPConfiguration servicecentralized management
    NWProxy
    CPBackend host A
    CPBackend host B
  2. Among the updates are the hosts that make up each backend cluster.

    Architecture diagram: Discovery and dynamic configuration
    CPConfiguration service
    NWProxy
    CPBackend host A
    CPBackend host B
  3. The proxy can actively check the health of upstream clusters.

    Architecture diagram: Discovery and dynamic configuration
    CPConfiguration service
    NWProxy
    CPBackend host Aactive health check
    CPBackend host Bactive health check
  4. It combines what discovery reports with the result of health checking to define the healthy load-balancing targets.

    Architecture diagram: Discovery and dynamic configuration
    CPConfiguration service
    NWProxypicks targets
    CPBackend host A
    CPBackend host B
  5. In addition to active checking, there is passive health checking, done by an outlier detection subsystem.

    Architecture diagram: Discovery and dynamic configuration
    CPConfiguration service
    NWProxypassivo
    CPBackend host A
    CPBackend host B

04 · BEHAVIOR

What a single proxy centralizes

Because it is a standalone proxy and not a library, Envoy implements advanced load balancing techniques in one place, accessible to any application. The list in the CNCF announcement includes zone awareness, retries, timeouts, circuit breaking, rate limiting, shadowing, and outlier detection.

The documentation also sees substantial benefit in using the same software at the edge. Envoy has a routing subsystem that routes requests based on path, authority, and content type, among other criteria.

  1. External traffic enters through an edge proxy, the same type of software that runs next to the services.

    Architecture diagram: Edge proxy and internal mesh
    CLExternal client
    NWEdge proxyborda
    NWFirst service's proxy
    CPFirst service
    NWSecond service's proxy
    CPSecond service
  2. The edge proxy routes the request to the destination service.

    Architecture diagram: Edge proxy and internal mesh
    CLExternal client
    NWEdge proxy
    NWFirst service's proxy
    CPFirst service
    NWSecond service's proxy
    CPSecond service
  3. From there on, calls between services go through the mesh of proxies next to each service.

    Architecture diagram: Edge proxy and internal mesh
    CLExternal client
    NWEdge proxy
    NWFirst service's proxy
    CPFirst service
    NWSecond service's proxy
    CPSecond service

The main goal is to make the network transparent, but the documentation acknowledges that problems occur at both the network level and the application level. That is why Envoy includes robust statistics support for all subsystems and supports distributed tracing through third-party providers.

05 · LEGACY

From Lyft to the service mesh ecosystem

According to the CNCF, service meshes provide a dedicated infrastructure layer to make service-to-service communication secure, fast, and reliable. Klein described Envoy as a universal data plane, in which the mesh works wherever the code is running.

The CNCF announcement was published on September 13, 2017 and records the vote to host Envoy as the 11th project. It states that several companies contribute to the project, including Google and IBM, and that Lyft is collaborating with Google and IBM to bring Envoy to Kubernetes through the Istio project.

Frequently asked questions

What is Lyft Envoy and the birth of the service mesh?

Real production architecture. Key points: service discovery and mesh.

What does the Lyft Envoy and the birth of the service mesh design cover?

It is organized in these sections: From monolithic architecture to the network as a problem, One proxy next to each service, Service discovery and dynamic configuration, What a single proxy centralizes, and From Lyft to the service mesh ecosystem.

How long is Lyft Envoy and the birth of the service mesh and what level is it?

It takes about 17 minutes to read and is rated Senior level.

Now design it yourself

Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.