Envoy Proxy — Cloud-Native High-Performance Service Proxy
Envoy is a cloud-native high-performance edge, middle, and service proxy. Originally built at Lyft, now a CNCF graduated project. The data plane behind Istio, AWS App Mesh, and many service mesh implementations. Written in C++ for maximum performance.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install c457cbe3-3638-11f1-9bc6-00163e2b0d79 --target codex先 dry-run 确认安装计划,再运行此命令。
What it is
Envoy is a high-performance edge, middle, and service proxy originally built at Lyft and now a CNCF graduated project. Written in C++, it serves as the data plane for service mesh implementations including Istio, AWS App Mesh, and many others. Envoy handles L3/L4 and L7 traffic with advanced load balancing, observability, and security features.
Envoy targets platform engineers and DevOps teams building microservice architectures who need a programmable proxy for traffic management, observability, and security at the network layer.
How it saves time or tokens
Without Envoy, service-to-service communication requires each application to implement its own retry logic, circuit breaking, rate limiting, and observability. Envoy moves these concerns out of application code and into the infrastructure layer. This means developers write business logic while the proxy handles cross-cutting network concerns.
Envoy's admin interface at port 9901 provides real-time stats, cluster health, and configuration inspection without adding instrumentation to your services.
How to use
- Start Envoy with Docker:
docker run -d --name envoy -p 10000:10000 -p 9901:9901 \
envoyproxy/envoy:v1.31-latest
- Access the admin interface at
http://localhost:9901.
- Configure a minimal listener and cluster in
envoy.yaml:
static_resources:
listeners:
- name: listener_0
address:
socket_address:
address: 0.0.0.0
port_value: 10000
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: backend
domains: ['*']
routes:
- match: { prefix: '/' }
route: { cluster: service_backend }
http_filters:
- name: envoy.filters.http.router
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: service_backend
connect_timeout: 5s
type: STRICT_DNS
load_assignment:
cluster_name: service_backend
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: backend-service
port_value: 8080
Example
Test the proxy with curl:
# Send traffic through Envoy
curl http://localhost:10000/
# Check cluster health via admin
curl http://localhost:9901/clusters
# View real-time stats
curl http://localhost:9901/stats
Related on TokRepo
- DevOps Tools -- Infrastructure and deployment tooling
- AI Gateway Providers -- API gateway and proxy solutions
Common pitfalls
- Envoy configuration is verbose YAML with deeply nested typed_config blocks. Start with the minimal example above and add features incrementally rather than copying full production configs.
- The admin interface (port 9901) exposes sensitive cluster and config data. Never expose it publicly in production. Bind it to localhost or protect it with network policies.
- Envoy does not reload configuration files automatically. Use xDS (discovery service) APIs for dynamic configuration, or restart the container after config changes.
常见问题
Istio uses Envoy as its data plane proxy. Istio provides the control plane (configuration, policy, telemetry) while Envoy handles actual traffic proxying in each pod sidecar. Envoy can also be used standalone without Istio.
Yes. Envoy has native support for gRPC proxying, load balancing, and transcoding (converting gRPC to REST and vice versa). It understands the gRPC protocol at L7 and can route based on gRPC service and method names.
Envoy is designed for service mesh and microservice environments with features like dynamic configuration via xDS APIs, built-in observability, and advanced load balancing. Nginx is a general-purpose web server and reverse proxy. They serve overlapping but different primary use cases.
xDS is Envoy's set of discovery service APIs (LDS, RDS, CDS, EDS) that allow dynamic configuration updates without restarts. Control planes like Istio use xDS to push configuration to Envoy sidecars in real time.
Yes. Envoy supports TLS termination, TLS origination, and mutual TLS (mTLS). In service mesh deployments, Envoy typically handles mTLS between services automatically, encrypting all inter-service traffic.
引用来源 (3)
- Envoy GitHub— Envoy is a CNCF graduated high-performance service proxy
- Envoy Documentation— Envoy proxy architecture and configuration reference
- CNCF— CNCF graduated project status for Envoy
讨论
相关资产
Pomerium — Identity-Aware Zero Trust Access Proxy
Pomerium is an open source reverse proxy that provides secure, identity-aware access to internal applications without a VPN, implementing BeyondCorp-style zero trust networking with SSO integration.
WAMR — WebAssembly Micro Runtime for Embedded and IoT
WAMR (WebAssembly Micro Runtime) is a lightweight, high-performance WebAssembly runtime by the Bytecode Alliance. It supports interpreter, ahead-of-time, and JIT compilation modes, targeting resource-constrained devices from MCUs to cloud edge nodes.
Uno Platform — Pixel-Perfect Multi-Platform Apps with .NET
Build native mobile, desktop, and web applications from a single C# and XAML codebase targeting Windows, iOS, Android, macOS, Linux, and WebAssembly with pixel-perfect fidelity.
Kepler.gl — Open Source Geospatial Data Visualization
A powerful open-source tool for large-scale geospatial data visualization built on deck.gl and Mapbox GL.