How to Configure Envoy Proxy for Microservices
Envoy is a high-performance proxy designed for microservice architectures. It provides advanced load balancing, observability, and service mesh capabilities for applications running on your Breeze server.
Deploying Envoy with Docker
docker run -d --name envoy \
-p 8080:8080 -p 9901:9901 \
-v $(pwd)/envoy.yaml:/etc/envoy/envoy.yaml \
envoyproxy/envoy:v1.31-latest
Basic Envoy Configuration
Create envoy.yaml with front proxy routing:
static_resources:
listeners:
- name: main_listener
address:
socket_address:
address: 0.0.0.0
port_value: 8080
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
route_config:
virtual_hosts:
- name: services
domains: ["*"]
routes:
- match: { prefix: "/api/users" }
route: { cluster: user_service }
- match: { prefix: "/api/orders" }
route: { cluster: order_service }
http_filters:
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: user_service
connect_timeout: 5s
type: STRICT_DNS
load_assignment:
cluster_name: user_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: user-svc
port_value: 3000
- name: order_service
connect_timeout: 5s
type: STRICT_DNS
load_assignment:
cluster_name: order_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: order-svc
port_value: 3001
admin:
address:
socket_address:
address: 0.0.0.0
port_value: 9901
Key Envoy Features
- Circuit breaking — prevents cascading failures between services
- Retries and timeouts — configurable per-route retry policies
- Observability — built-in stats, tracing, and access logging
- Health checking — active and passive health checks for upstream clusters
- Rate limiting — local and global rate limit support
Access the admin dashboard at http://your-breeze-ip:9901 to view real-time statistics and cluster health.