envoyproxy / envoyproxy/envoy

Could you add some examples about outlier_detection in the examples directory?

Open
#34,861 5 comments 0 reactions 1 assignee Claimed by @ogetysaisandeep View on GitHub
area/docs area/examples help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

I searched for a long time in the examples directory and [docs](https://www.envoyproxy.io/docs/envoy/latest/configuration/upstream/cluster_manager/cluster_runtime#outlier-detection) 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.

```yaml
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

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.