-
Notifications
You must be signed in to change notification settings - Fork 0
/
envoy.yaml
80 lines (75 loc) · 2.9 KB
/
envoy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
static_resources:
listeners:
- name: "backendservicelistener"
address:
socket_address:
address: 0.0.0.0
port_value: 7000
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
codec_type: AUTO # hmm?
stat_prefix: ingress_http # just a metrics prefix?
route_config:
name: local_route # hmm?
virtual_hosts:
- name: backend # hmm?
domains:
- "*" # hmm?
routes:
- match:
prefix: "/service"
route:
cluster: backendservicecluster
http_filters:
- name: envoy.filters.http.router
typed_config: {}
####################
# https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/service_discovery
# this is where things are a bit interesting. do we do STATIC_DNS here?
# in virtually all cases we're just going to be hitting an AWS ELB or ALB
# so we don't need more load balancing. nor do we need service discovery...
# DNS is our service discovery, Route53+kubernetes's ingress to pods in a Service+Deployment
clusters:
- name: backendservicecluster
connect_timeout: 0.25s
type: STRICT_DNS # hmm
lb_policy: ROUND_ROBIN #hmm sure...wouldn't we just want the ELB to do it's job?
load_assignment:
cluster_name: backendservicecluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: backendservice # "hostname" of the container?
port_value: 8080 # 8080 cuz it's configured via dropwizard's default
# https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/circuit_breaker.proto#envoy-v3-api-msg-config-cluster-v3-circuitbreakers
circuit_breakers:
thresholds:
- max_retries: 0 # default is 3, lets not
max_connections: 1 # default is 1024
max_requests: 1
max_pending_requests: 5
track_remaining: true
#TODO try this
#https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/outlier_detection.proto#envoy-v3-api-msg-config-cluster-v3-outlierdetection
# outlier_detection:
# consecutive_5xx: 3
# base_ejection_time: 30s
# max_ejection_percent: 100
# health_checks:
# - timeout: 1s
# interval: 10s
# interval_jitter: 1s
# unhealthy_threshold: 6
# healthy_threshold: 1
# http_health_check:
# path: "/health"
admin:
address:
socket_address:
address: 0.0.0.0
port_value: 8001