-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Should xDS resource lookup from the control plane use case-sensitive matching?
There is a subtle corner case with VHDS. When Envoy requests a VHDS update based on the Host / :authority header, it constructs the subscription resource name by combining the route configuration name (e.g. "global") with the header value (see the code here). However, since the HTTP Host header is defined as case-insensitive, Envoy normalizes it to lowercase before forming the subscription string (see here).
This creates a potential inconsistency:
xDS resource names are treated as case-sensitive identifiers.
VHDS resource names derived from the Host header are matched in a case-insensitive manner due to normalization.
Given this, a few questions arise:
- If xDS resource names are case-sensitive, should Envoy consistently apply case-sensitive matching when retrieving resources from the control plane, even when the resource name is derived from the Host / :authority header?
- If case sensitivity is preserved, should VHDS resources such as "global/fooService" and "global/FooService" be allowed to coexist as distinct resources?
- Is the current behavior (lowercasing the host header before constructing the VHDS resource name) an intentional design choice, or an implicit compromise between HTTP semantics and xDS naming semantics?
Any guidance or insights on the intended behavior and best practices here would be appreciated.