envoyproxy/envoy
GitHub で見るCould you add some examples about outlier_detection in the examples directory?
Open
#34,861 opened on 2024年6月24日
area/docsarea/exampleshelp wanted
Repository metrics
- Stars
- (27,997 stars)
- PR merge metrics
- (平均マージ 8d) (30d で 378 merged PRs)
説明
I searched for a long time in the examples directory and docs and wanted to test the outlier_detection function.
But it never works, not sure where is wrong with the configuration! I hope you have an outlier_detection example in the examples directory.
The following configuration will not automatically kick the host out regardless of how many 500 errors the upstream http service has.
admin:
address:
socket_address:
address: 0.0.0.0
port_value: 8001
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
codec_type: AUTO
stat_prefix: ingress_http
upgrade_configs:
- upgrade_type: websocket
access_log:
- name: envoy.access_loggers.stdout
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
route_config:
name: rc01
virtual_hosts:
- name: vh01
domains:
- "*"
routes:
- name: retry-route
match:
prefix: /
headers:
- name: "enable-retry"
exact_match: "y"
route:
cluster: envoy_rest_server
retry_policy:
retry_on: "connect-failure,refused-stream,reset,gateway-error"
num_retries: 3
per_try_timeout: 0.5s
- name: timeout-route
match:
prefix: /
headers:
- name: "enable-timeout"
exact_match: "y"
route:
cluster: envoy_rest_server
timeout: 0.5s
- name: default_route
match:
prefix: /
route:
cluster: envoy_rest_server
http_filters:
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: envoy_rest_server
connect_timeout: 0.25s
outlier_detection:
consecutive_5xx: 3
interval: "10s"
base_ejection_time: "30s"
max_ejection_time: "30s"
max_ejection_percent: 100
enforcing_consecutive_5xx: 100
type: STATIC
load_assignment:
cluster_name: envoy_rest_server
endpoints:
- priority: 0
lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.0.35
port_value: 18081
- priority: 1
lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.0.35
port_value: 18082
- priority: 2
lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.0.35
port_value: 18083