# openshift-service-mesh/envoy architecture

> Architecture diagram of the GitHub repository openshift-service-mesh/envoy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openshift-service-mesh/envoy
- Repository: https://github.com/openshift-service-mesh/envoy

## Overview

Envoy is a cloud-native edge, middle, and service proxy. Its principal runtime path accepts downstream connections, processes HTTP streams through configured filters and routing, then uses upstream clusters and connection pools to reach services; it also supports dynamic xDS configuration, access logging, and mobile-engine embedding. The graph reflects these documented capabilities and sampled interfaces/implementations. Several runtime links are dashed because the relevant dispatch or call sites were not excerpted.

Main entry points: [`source/common/http/conn_manager_impl.cc`](https://github.com/openshift-service-mesh/envoy/blob/main/source/common/http/conn_manager_impl.cc) (HTTP connection manager), [`source/common/upstream/cluster_manager_impl.cc`](https://github.com/openshift-service-mesh/envoy/blob/main/source/common/upstream/cluster_manager_impl.cc) (Cluster management), [`source/common/config/xds_manager_impl.cc`](https://github.com/openshift-service-mesh/envoy/blob/main/source/common/config/xds_manager_impl.cc) (xDS manager), [`source/exe/main.cc`](https://github.com/openshift-service-mesh/envoy/blob/main/source/exe/main.cc) (Envoy process)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Proxy Runtime"]
  node_entry["Envoy process<br/>[main.cc]"]
  node_listeners["Listener manager"]
  node_connections["Connection handling"]
  node_http["HTTP connection manager"]
  node_routing["HTTP routing"]
  node_clusters["Cluster management"]
  node_upstream["Upstream services<br/>[cluster_manager.h]"]
end

subgraph group_config["Configuration Control"]
  node_xds["xDS manager"]
  node_bootstrap["Bootstrap config<br/>[bootstrap.proto]"]
  node_listener_api["Listener config API<br/>[listener_manager.h]"]
end

subgraph group_policy["Filters and Telemetry"]
  node_http_filters["HTTP filters"]
  node_rbac["RBAC engine<br/>[engine_impl.cc]"]
  node_accesslog["Access logging"]
end

subgraph group_mobile["Mobile Engine"]
  node_mobile_builder["Mobile engine builder<br/>[engine_builder.cc]"]
  node_mobile_engine["Mobile internal engine<br/>[internal_engine.cc]"]
end

node_client(("Downstream clients"))
node_mobile_client(("Mobile app"))

node_client -.->|"sends traffic"| node_entry
node_entry -.->|"starts runtime"| node_listeners
node_listeners -.->|"accepts connections"| node_connections
node_connections -.->|"dispatches HTTP"| node_http
node_http -.->|"routes requests"| node_routing
node_http -->|"logs streams"| node_accesslog
node_http -.->|"runs filters"| node_http_filters
node_http_filters -.->|"checks policy"| node_rbac
node_routing -.->|"selects cluster"| node_clusters
node_clusters -->|"manages pools"| node_upstream
node_bootstrap -->|"configures clusters"| node_clusters
node_clusters -->|"initializes manager"| node_xds
node_xds -->|"reads config"| node_bootstrap
node_xds -.->|"updates listeners"| node_listener_api
node_mobile_client -.->|"configures engine"| node_mobile_builder
node_mobile_builder -.->|"builds engine"| node_mobile_engine
node_mobile_engine -->|"uses HTTP client"| node_http

click node_entry "https://github.com/openshift-service-mesh/envoy/blob/main/source/exe/main.cc"
click node_listeners "https://github.com/openshift-service-mesh/envoy/blob/main/source/common/listener_manager/listener_manager_impl.cc"
click node_connections "https://github.com/openshift-service-mesh/envoy/blob/main/envoy/network/connection_handler.h"
click node_http "https://github.com/openshift-service-mesh/envoy/blob/main/source/common/http/conn_manager_impl.cc"
click node_routing "https://github.com/openshift-service-mesh/envoy/blob/main/api/envoy/config/route/v3/route_components.proto"
click node_clusters "https://github.com/openshift-service-mesh/envoy/blob/main/source/common/upstream/cluster_manager_impl.cc"
click node_upstream "https://github.com/openshift-service-mesh/envoy/blob/main/envoy/upstream/cluster_manager.h"
click node_xds "https://github.com/openshift-service-mesh/envoy/blob/main/source/common/config/xds_manager_impl.cc"
click node_bootstrap "https://github.com/openshift-service-mesh/envoy/blob/main/api/envoy/config/bootstrap/v3/bootstrap.proto"
click node_listener_api "https://github.com/openshift-service-mesh/envoy/blob/main/envoy/server/listener_manager.h"
click node_http_filters "https://github.com/openshift-service-mesh/envoy/tree/main/api/envoy/extensions/filters/http"
click node_rbac "https://github.com/openshift-service-mesh/envoy/blob/main/source/extensions/filters/common/rbac/engine_impl.cc"
click node_accesslog "https://github.com/openshift-service-mesh/envoy/blob/main/source/common/http/conn_manager_impl.cc"
click node_mobile_builder "https://github.com/openshift-service-mesh/envoy/blob/main/mobile/library/cc/engine_builder.cc"
click node_mobile_engine "https://github.com/openshift-service-mesh/envoy/blob/main/mobile/library/common/internal_engine.cc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_listeners,node_connections,node_http,node_routing,node_clusters,node_upstream,node_client toneBlue
class node_xds,node_bootstrap,node_listener_api toneAmber
class node_http_filters,node_rbac,node_accesslog toneMint
class node_mobile_builder,node_mobile_engine toneRose
class node_mobile_client toneIndigo
```

## Components

### Proxy Runtime

- [Envoy process](https://github.com/openshift-service-mesh/envoy/blob/main/source/exe/main.cc): `source/exe/main.cc`
- [Listener manager](https://github.com/openshift-service-mesh/envoy/blob/main/source/common/listener_manager/listener_manager_impl.cc): `source/common/listener_manager/listener_manager_impl.cc`
- [Connection handling](https://github.com/openshift-service-mesh/envoy/blob/main/envoy/network/connection_handler.h): `envoy/network/connection_handler.h`
- [HTTP connection manager](https://github.com/openshift-service-mesh/envoy/blob/main/source/common/http/conn_manager_impl.cc): `source/common/http/conn_manager_impl.cc`
- [HTTP routing](https://github.com/openshift-service-mesh/envoy/blob/main/api/envoy/config/route/v3/route_components.proto): `api/envoy/config/route/v3/route_components.proto`
- [Cluster management](https://github.com/openshift-service-mesh/envoy/blob/main/source/common/upstream/cluster_manager_impl.cc): `source/common/upstream/cluster_manager_impl.cc`
- [Upstream services](https://github.com/openshift-service-mesh/envoy/blob/main/envoy/upstream/cluster_manager.h): `envoy/upstream/cluster_manager.h`

### Configuration Control

- [xDS manager](https://github.com/openshift-service-mesh/envoy/blob/main/source/common/config/xds_manager_impl.cc): `source/common/config/xds_manager_impl.cc`
- [Bootstrap config](https://github.com/openshift-service-mesh/envoy/blob/main/api/envoy/config/bootstrap/v3/bootstrap.proto): `api/envoy/config/bootstrap/v3/bootstrap.proto`
- [Listener config API](https://github.com/openshift-service-mesh/envoy/blob/main/envoy/server/listener_manager.h): `envoy/server/listener_manager.h`

### Filters and Telemetry

- [HTTP filters](https://github.com/openshift-service-mesh/envoy/tree/main/api/envoy/extensions/filters/http): `api/envoy/extensions/filters/http`
- [RBAC engine](https://github.com/openshift-service-mesh/envoy/blob/main/source/extensions/filters/common/rbac/engine_impl.cc): `source/extensions/filters/common/rbac/engine_impl.cc`
- [Access logging](https://github.com/openshift-service-mesh/envoy/blob/main/source/common/http/conn_manager_impl.cc): `source/common/http/conn_manager_impl.cc`

### Mobile Engine

- [Mobile engine builder](https://github.com/openshift-service-mesh/envoy/blob/main/mobile/library/cc/engine_builder.cc): `mobile/library/cc/engine_builder.cc`
- [Mobile internal engine](https://github.com/openshift-service-mesh/envoy/blob/main/mobile/library/common/internal_engine.cc): `mobile/library/common/internal_engine.cc`

### Other components

- **Downstream clients**
- **Mobile app**

## Connections

- Downstream clients → Envoy process: sends traffic (evidence: `README.md`)
- Envoy process → Listener manager: starts runtime
- Listener manager → Connection handling: accepts connections
- Connection handling → HTTP connection manager: dispatches HTTP
- HTTP connection manager → HTTP routing: routes requests
- HTTP connection manager → Access logging: logs streams (evidence: `source/common/http/conn_manager_impl.cc`)
- HTTP connection manager → HTTP filters: runs filters
- HTTP filters → RBAC engine: checks policy
- HTTP routing → Cluster management: selects cluster
- Cluster management → Upstream services: manages pools (evidence: `source/common/upstream/cluster_manager_impl.cc`)
- Bootstrap config → Cluster management: configures clusters (evidence: `source/common/upstream/cluster_manager_impl.cc`)
- Cluster management → xDS manager: initializes manager (evidence: `source/common/upstream/cluster_manager_impl.cc`)
- xDS manager → Bootstrap config: reads config
- xDS manager → Listener config API: updates listeners
- Mobile app → Mobile engine builder: configures engine
- Mobile engine builder → Mobile internal engine: builds engine
- Mobile internal engine → HTTP connection manager: uses HTTP client (evidence: `mobile/library/common/internal_engine.cc`)
