Skip to content

Are xDS resource names case-sensitive? #42803

@whutwhu

Description

@whutwhu

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:

  1. 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?
  2. If case sensitivity is preserved, should VHDS resources such as "global/fooService" and "global/FooService" be allowed to coexist as distinct resources?
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageIssue requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions