Repository metrics
- Stars
- (27,997 stars)
- PR merge metrics
- (Avg merge 8d) (378 merged PRs in 30d)
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: <value> 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.