More descriptive load balancing failure messages
- Dominant language
- C++
- Stars
- 28.9k
- Forks
- 5.6k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 430
Description
Currently we assume that if a load balancer implementation returns `nullptr` that this means `no healthy upstream`. For load balancers like the subset lb, it could also mean that no host existed that satisfied the requirement (i.e. no subset found). It would be helpful to provide some mechanism to surface the failure reason, which could be included in some way in the local reply.
This would in turn allow creating local reply mappings based on it, making it possible to have Envoy respond with errors such as `no subset found for x-subset-header: ` or similar.
The simplest way of doing this would probably be to update the `chooseHost` signature to also return an optional error string, allowing the lb to include additional information when relevant.
Contributor guide
Assessment
This issue has not been assessed yet.