Skip to content

Commit

Permalink
Set ignore_health_on_host_removal to true for static clusters (envoyp…
Browse files Browse the repository at this point in the history
…roxy#4612)

Removes the endpoint from the pool faster instead of waiting
for the result of the active health.
Since the control plane already has definitive endpoint health info
from the EndpointSlice API, its safe to set this.

Fixes: envoyproxy#4564

Signed-off-by: Arko Dasgupta <[email protected]>
(cherry picked from commit 1a57daf)
Signed-off-by: Huabing Zhao <[email protected]>
  • Loading branch information
arkodg authored and zhaohuabing committed Nov 5, 2024
1 parent 53c50e1 commit ac57219
Show file tree
Hide file tree
Showing 136 changed files with 282 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: httproute/default/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/default/backend/rule/0
outlierDetection: {}
Expand All @@ -797,6 +798,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: grpcroute/default/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: grpcroute/default/backend/rule/0
outlierDetection: {}
Expand All @@ -823,6 +825,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: tcproute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: tcproute/default/backend/rule/-1
outlierDetection: {}
Expand All @@ -842,6 +845,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: tlsroute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: tlsroute/default/backend/rule/-1
outlierDetection: {}
Expand All @@ -861,6 +865,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: udproute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: udproute/default/backend/rule/-1
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: httproute/envoy-gateway-system/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/envoy-gateway-system/backend/rule/0
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@
},
"serviceName": "httproute/default/backend/rule/0"
},
"ignoreHealthOnHostRemoval": true,
"lbPolicy": "LEAST_REQUEST",
"name": "httproute/default/backend/rule/0",
"outlierDetection": {},
Expand Down Expand Up @@ -495,6 +496,7 @@
},
"serviceName": "grpcroute/default/backend/rule/0"
},
"ignoreHealthOnHostRemoval": true,
"lbPolicy": "LEAST_REQUEST",
"name": "grpcroute/default/backend/rule/0",
"outlierDetection": {},
Expand Down Expand Up @@ -535,6 +537,7 @@
},
"serviceName": "tcproute/default/backend/rule/-1"
},
"ignoreHealthOnHostRemoval": true,
"lbPolicy": "LEAST_REQUEST",
"name": "tcproute/default/backend/rule/-1",
"outlierDetection": {},
Expand Down Expand Up @@ -564,6 +567,7 @@
},
"serviceName": "tlsroute/default/backend/rule/-1"
},
"ignoreHealthOnHostRemoval": true,
"lbPolicy": "LEAST_REQUEST",
"name": "tlsroute/default/backend/rule/-1",
"outlierDetection": {},
Expand Down Expand Up @@ -593,6 +597,7 @@
},
"serviceName": "udproute/default/backend/rule/-1"
},
"ignoreHealthOnHostRemoval": true,
"lbPolicy": "LEAST_REQUEST",
"name": "udproute/default/backend/rule/-1",
"outlierDetection": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: httproute/default/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/default/backend/rule/0
outlierDetection: {}
Expand All @@ -276,6 +277,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: grpcroute/default/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: grpcroute/default/backend/rule/0
outlierDetection: {}
Expand All @@ -302,6 +304,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: tcproute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: tcproute/default/backend/rule/-1
outlierDetection: {}
Expand All @@ -321,6 +324,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: tlsroute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: tlsroute/default/backend/rule/-1
outlierDetection: {}
Expand All @@ -340,6 +344,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: udproute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: udproute/default/backend/rule/-1
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: httproute/default/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/default/backend/rule/0
outlierDetection: {}
Expand All @@ -35,6 +36,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: grpcroute/default/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: grpcroute/default/backend/rule/0
outlierDetection: {}
Expand All @@ -61,6 +63,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: tcproute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: tcproute/default/backend/rule/-1
outlierDetection: {}
Expand All @@ -80,6 +83,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: tlsroute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: tlsroute/default/backend/rule/-1
outlierDetection: {}
Expand All @@ -99,6 +103,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: udproute/default/backend/rule/-1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: udproute/default/backend/rule/-1
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@
},
"serviceName": "httproute/envoy-gateway-system/backend/rule/0"
},
"ignoreHealthOnHostRemoval": true,
"lbPolicy": "LEAST_REQUEST",
"name": "httproute/envoy-gateway-system/backend/rule/0",
"outlierDetection": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: httproute/envoy-gateway-system/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/envoy-gateway-system/backend/rule/0
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: httproute/envoy-gateway-system/backend/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/envoy-gateway-system/backend/rule/0
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ xds:
ads: {}
resourceApiVersion: V3
serviceName: httproute/envoy-gateway-system/routes/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/envoy-gateway-system/routes/rule/0
outlierDetection: {}
Expand Down
3 changes: 3 additions & 0 deletions internal/xds/translator/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ func buildXdsCluster(args *xdsClusterArgs) *clusterv3.Cluster {
},
},
}
// Dont wait for a health check to determine health and remove these endpoints
// if the endpoint has been removed via EDS by the control plane
cluster.IgnoreHealthOnHostRemoval = true
} else {
cluster.ClusterDiscoveryType = &clusterv3.Cluster_Type{Type: clusterv3.Cluster_STRICT_DNS}
cluster.DnsRefreshRate = durationpb.New(30 * time.Second)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: udp-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: udp-route-dest
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: first-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: first-route-dest
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: first-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: first-route-dest
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog/monitoring/envoy-als/port/9000
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog/monitoring/envoy-als/port/9000
outlierDetection:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: direct-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: direct-route-dest
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: direct-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: direct-route-dest
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: direct-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: direct-route-dest
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: direct-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: direct-route-dest
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: direct-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: direct-route-dest
outlierDetection: {}
Expand All @@ -27,6 +28,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog_als_0_1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog_als_0_1
outlierDetection: {}
Expand All @@ -51,6 +53,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog_als_0_2
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog_als_0_2
outlierDetection: {}
Expand All @@ -75,6 +78,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog_als_1_1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog_als_1_1
outlierDetection: {}
Expand All @@ -99,6 +103,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog_als_1_2
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog_als_1_2
outlierDetection: {}
Expand All @@ -123,6 +128,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog_als_2_1
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog_als_2_1
outlierDetection: {}
Expand All @@ -147,6 +153,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog_als_2_2
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog_als_2_2
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: direct-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: direct-route-dest
outlierDetection: {}
Expand All @@ -27,6 +28,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog/monitoring/envoy-als/port/9000
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog/monitoring/envoy-als/port/9000
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: direct-route-dest
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: direct-route-dest
outlierDetection: {}
Expand All @@ -27,6 +28,7 @@
ads: {}
resourceApiVersion: V3
serviceName: accesslog/monitoring/envoy-als/port/9000
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: accesslog/monitoring/envoy-als/port/9000
outlierDetection: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ads: {}
resourceApiVersion: V3
serviceName: httproute/default/httproute-3/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/default/httproute-3/rule/0
outlierDetection: {}
Expand All @@ -27,6 +28,7 @@
ads: {}
resourceApiVersion: V3
serviceName: httproute/default/httproute-1/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/default/httproute-1/rule/0
outlierDetection: {}
Expand All @@ -44,6 +46,7 @@
ads: {}
resourceApiVersion: V3
serviceName: httproute/default/httproute-2/rule/0
ignoreHealthOnHostRemoval: true
lbPolicy: LEAST_REQUEST
name: httproute/default/httproute-2/rule/0
outlierDetection: {}
Expand Down
Loading

0 comments on commit ac57219

Please sign in to comment.