envoyproxy/envoy

More descriptive load balancing failure messages

Open

#14 912 ouverte le 2 févr. 2021

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)C++ (5 373 forks)batch import
area/load balancingenhancementhelp wanted

Métriques du dépôt

Stars
 (27 997 stars)
Métriques de merge PR
 (Merge moyen 8j) (378 PRs mergées en 30 j)

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.

Guide contributeur