Unable to drain endpoints before removal
- Vorherrschende Sprache
- C++
- Sterne
- 28.9k
- Forks
- 5.6k
- Ø Merge
- 1 T. 22 Std.
- Gemergte PRs (30 T.)
- 430
Beschreibung
*Title*: Unable to drain endpoints before removal
*Description*:
I'm trying to implement endpoint connection draining (and not draining envoy itself) with sticky sessions configured.
At t=0, there are 5 endpoints configured in my envoy cluster with cookie based sticky sessions configured.
At t=10, I wish to drain 1 out of the 5 endpoints I have i.e. I do not want any new connections to be routed to that endpoint, but I want the current sessions to persist before I remove the endpoint from the list.
In order to drain an endpoint, I've tried 2 approaches -
1. Set `'health_status': 'DRAINING'` in the endpoint (See https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/health_check.proto#envoy-api-enum-core-healthstatus)
This takes care of not sending any new connections to the endpoint, but does not allow older sticky sessions to persist and they're broken off.
I got leads for this from https://github.com/envoyproxy/envoy/issues/2920#issuecomment-388123100, but doesn't seem to work :man_shrugging:
2. Set `load_balancing_weight: 1` in the endpoint in the hope that a lower weight will not route any new requests to the endpoint but the sticky sessions will persist, but that didn't happen.
So, what am I missing here? Any pointers are appreciated! Thanks :)
*Config*:
This is how the endpoint configuration looks when I'm trying to drain it -
```
{
"endpoint": {
"address": {
"socket_address": {
"address": "172.17.0.9",
"port_value": 8080
}
}
}
},
{
"endpoint": {
"address": {
"socket_address": {
"address": "172.17.0.14",
"port_value": 8080
}
}
},
"health_status": "DRAINING"
},
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.