envoyproxy/envoy

More descriptive load balancing failure messages

Open

#14.912 geöffnet am 2. Feb. 2021

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/load balancingenhancementhelp wanted

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide