Configure a static Envoy HTTP proxy: connect listener, route, and cluster
Envoy accepts a request at a listener, the HTTP connection manager selects a route, and the route forwards it to a named cluster. This guide covers one HTTP listener and a static cluster with two upstreams, using the v3 API. The source versions checked on 2026-11-19 differ: static configuration v1.37.7, runtime and health checks v1.38.9, and current route matching. Validate against the binary you deploy. xDS, TLS termination, and Kubernetes Gateway are out of scope.
Envoy accepts a request at a listener, the HTTP connection manager selects a route, and the route forwards it to a named cluster. This guide covers one HTTP listener and a static cluster with two upstreams, using the v3 API. The source versions checked on 2026-11-19 differ: static configuration v1.37.7, runtime and health checks v1.38.9, and current route matching. Validate against the binary you deploy. xDS, TLS termination, and Kubernetes Gateway are out of scope.
Request path
A listener binds an address and port. The HTTP connection manager parses HTTP and contains virtual hosts and routes. Envoy matches Host or :authority to a virtual host, then checks routes in order. The selected route names a cluster, which defines upstreams, connection timeout, load balancing, and optional health checks. Static addresses need updates when instances change.
Example
The YAML below listens only on loopback port 10000, routes all paths to app_pool, and checks two local upstreams at /healthz. Adapt addresses and health behavior to your service. HTTP health checks expect 200 by default. Intervals and thresholds are examples, not universal recommendations; use a lightweight, side-effect-free health endpoint.
static_resources:
listeners:
- name: local_http
address:
socket_address:
address: 127.0.0.1
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_routes
virtual_hosts:
- name: app
domains: ["*"]
routes:
- match:
prefix: "/"
route:
cluster: app_pool
http_filters:
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: app_pool
type: STATIC
connect_timeout: 1s
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: app_pool
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8001
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8002
health_checks:
- timeout: 1s
interval: 5s
unhealthy_threshold: 2
healthy_threshold: 2
http_health_check:
path: /healthzValidate and verify
Check the installed version, save as envoy.yaml, and run envoy --mode validate -c envoy.yaml. Valid configuration prints OK and exits 0; invalid configuration reports errors and exits 1. Validate mode does not start the proxy or make network connections. Check both backends and health paths, start Envoy using your deployment process, request http://127.0.0.1:10000/, and inspect backend logs. In a safe test environment, fail one health check and confirm recovery. This sample was not run or binary-validated.
Troubleshoot and recover
For rejected config, check YAML, v3 type URLs, required fields, cluster names, and extensions included in the build. For 404 or route errors, check Host/:authority, domains, route order, and prefixes. For 503, check ports, firewall, backend readiness, logs, and cluster stats before changing timeouts. For unhealthy hosts, check path, expected status, and logs. Restore the last known-good config, validate it, and verify a real request. The admin interface is omitted; if enabled, bind it only to a restricted management network and never expose it publicly.
Sources and limits
[Static configuration, v1.37.7](https://www.envoyproxy.io/docs/envoy/v1.37.7/start/quick-start/configuration-static)
[Run Envoy, v1.38.9](https://www.envoyproxy.io/docs/envoy/v1.38.9/start/quick-start/run-envoy)
[Health checking, v1.38.9](https://www.envoyproxy.io/docs/envoy/v1.38.9/intro/arch_overview/upstream/health_checking)
[Route matching, current docs](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/route_matching.html)
[Installation, v1.38.9](https://www.envoyproxy.io/docs/envoy/v1.38.9/start/install)
Addresses and health paths are examples. TLS, xDS, admin API setup, real backends, execution, and load tests were not covered or performed.