xref: /aosp_15_r20/external/grpc-grpc/doc/grpc_xds_features.md (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1*cc02d7e2SAndroid Build Coastguard Worker# xDS Features in gRPC
2*cc02d7e2SAndroid Build Coastguard Worker
3*cc02d7e2SAndroid Build Coastguard WorkerThis document lists the [xDS](https://github.com/envoyproxy/data-plane-api/tree/master/envoy/api/v2)
4*cc02d7e2SAndroid Build Coastguard Workerfeatures supported in various gRPC language implementations and versions.
5*cc02d7e2SAndroid Build Coastguard Worker
6*cc02d7e2SAndroid Build Coastguard WorkerNote that a gRPC client will simply ignore the configuration of a feature it
7*cc02d7e2SAndroid Build Coastguard Workerdoes not support. The gRPC client does not generate a log
8*cc02d7e2SAndroid Build Coastguard Workerto indicate that some configuration was ignored. It is impractical to generate
9*cc02d7e2SAndroid Build Coastguard Workera log and keep it up-to-date because xDS has a large number of APIs that gRPC
10*cc02d7e2SAndroid Build Coastguard Workerdoes not support and the APIs keep evolving too. In the case where an xDS
11*cc02d7e2SAndroid Build Coastguard Workerfield corresponding to a feature is supported but the value configured for
12*cc02d7e2SAndroid Build Coastguard Workerthat field is not supported, a gRPC client will NACK such a configuration.
13*cc02d7e2SAndroid Build Coastguard WorkerWe recommend reading the
14*cc02d7e2SAndroid Build Coastguard Worker[first gRFC](https://github.com/grpc/proposal/blob/master/A27-xds-global-load-balancing.md)
15*cc02d7e2SAndroid Build Coastguard Workeron xDS support in gRPC to understand the design philosophy.
16*cc02d7e2SAndroid Build Coastguard Worker
17*cc02d7e2SAndroid Build Coastguard WorkerNot all cluster load balancing policies are supported. A gRPC client will
18*cc02d7e2SAndroid Build Coastguard WorkerNACK the configuration that contains unsupported cluster load balancing
19*cc02d7e2SAndroid Build Coastguard Workerpolicy. This will cause all cluster configurations to be rejected by the
20*cc02d7e2SAndroid Build Coastguard Workerclient because the xDS protocol currently requires rejecting all resources in
21*cc02d7e2SAndroid Build Coastguard Workera given response, rather than being able to reject only an individual resource
22*cc02d7e2SAndroid Build Coastguard Workerfrom the response. Due to this limitation, you must ensure that all clients
23*cc02d7e2SAndroid Build Coastguard Workersupport the required cluster load balancing policy before configuring that
24*cc02d7e2SAndroid Build Coastguard Workerpolicy for a service. For example, if you change the ROUND_ROBIN policy to
25*cc02d7e2SAndroid Build Coastguard WorkerRING_HASH, you must ensure that all the clients are upgraded to a version that
26*cc02d7e2SAndroid Build Coastguard Workersupports RING_HASH.
27*cc02d7e2SAndroid Build Coastguard Worker
28*cc02d7e2SAndroid Build Coastguard WorkerThe EDS policy will *not* support
29*cc02d7e2SAndroid Build Coastguard Worker[overprovisioning](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/overprovisioning),
30*cc02d7e2SAndroid Build Coastguard Workerwhich is different from Envoy.  Envoy takes the overprovisioning into
31*cc02d7e2SAndroid Build Coastguard Workeraccount in both [locality-weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
32*cc02d7e2SAndroid Build Coastguard Workerand [priority failover](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/priority),
33*cc02d7e2SAndroid Build Coastguard Workerbut gRPC assumes that the xDS server will update it to redirect traffic
34*cc02d7e2SAndroid Build Coastguard Workerwhen this kind of graceful failover is needed.  gRPC will send the
35*cc02d7e2SAndroid Build Coastguard Worker[`envoy.lb.does_not_support_overprovisioning` client
36*cc02d7e2SAndroid Build Coastguard Workerfeature](https://github.com/envoyproxy/envoy/pull/10136) to the xDS
37*cc02d7e2SAndroid Build Coastguard Workerserver to tell the xDS server that it will not perform graceful failover;
38*cc02d7e2SAndroid Build Coastguard WorkerxDS server implementations may use this to decide whether to perform
39*cc02d7e2SAndroid Build Coastguard Workergraceful failover themselves.
40*cc02d7e2SAndroid Build Coastguard Worker
41*cc02d7e2SAndroid Build Coastguard WorkerThe EDS policy will not support per-endpoint stats; it will report only
42*cc02d7e2SAndroid Build Coastguard Workerper-locality stats.
43*cc02d7e2SAndroid Build Coastguard Worker
44*cc02d7e2SAndroid Build Coastguard WorkerAn [`lb_endpoint`](https://github.com/envoyproxy/envoy/blob/12a4bc430eaf440ceb0d11286cfbd4c16b79cdd1/api/envoy/api/v2/endpoint/endpoint_components.proto#L72)
45*cc02d7e2SAndroid Build Coastguard Workeris ignored if the `health_status` is not HEALTHY or UNKNOWN.
46*cc02d7e2SAndroid Build Coastguard WorkerThe optional `load_balancing_weight` is always ignored.
47*cc02d7e2SAndroid Build Coastguard Worker
48*cc02d7e2SAndroid Build Coastguard WorkerInitially, only `google_default` channel creds will be supported
49*cc02d7e2SAndroid Build Coastguard Workerto authenticate with the xDS server.
50*cc02d7e2SAndroid Build Coastguard Worker
51*cc02d7e2SAndroid Build Coastguard WorkerThe gRPC language implementations not listed in the table below do not support
52*cc02d7e2SAndroid Build Coastguard WorkerxDS features.
53*cc02d7e2SAndroid Build Coastguard Worker
54*cc02d7e2SAndroid Build Coastguard WorkerFeatures | gRFCs  | [C++, Python,<br> Ruby, PHP](https://github.com/grpc/grpc/releases) | [Java](https://github.com/grpc/grpc-java/releases) | [Go](https://github.com/grpc/grpc-go/releases) | [Node](https://github.com/grpc/grpc-node/releases)
55*cc02d7e2SAndroid Build Coastguard Worker---------|--------|--------------|------|------|------
56*cc02d7e2SAndroid Build Coastguard Worker**xDS Infrastructure in gRPC client channel:**<ul><li>LDS->RDS->CDS->EDS flow</li><li>ADS stream</li></ul> | [A27](https://github.com/grpc/proposal/blob/master/A27-xds-global-load-balancing.md) | v1.30.0  | v1.30.0 | v1.30.0 | v1.2.0 |
57*cc02d7e2SAndroid Build Coastguard Worker**Load Balancing:**<ul><li>[Virtual host](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-virtualhost) domains matching</li><li>Only default path ("" or "/") matching</li><li>Priority-based weighted round-robin locality picking</li><li>Round-robin endpoint picking within locality</li><li>[Cluster](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routeaction) route action</li><li>Client-side Load reporting via [LRS](https://github.com/envoyproxy/data-plane-api/blob/master/envoy/service/load_stats/v3/lrs.proto)</li></ul> | [A27](https://github.com/grpc/proposal/blob/master/A27-xds-global-load-balancing.md) | v1.30.0  | v1.30.0 | v1.30.0 | v1.2.0 |
58*cc02d7e2SAndroid Build Coastguard WorkerRequest matching based on:<ul><li>[Path](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routematch) (prefix, full path and safe regex)</li><ul><li>[case_sensitive](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-routematch) must be true else config is NACKed</li></ul><li>[Headers](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-headermatcher)</li></ul>Request routing to multiple clusters based on [weights](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-weightedcluster) | [A28](https://github.com/grpc/proposal/blob/master/A28-xds-traffic-splitting-and-routing.md) | v1.31.0 | v1.31.0 | v1.31.0 | v1.3.0 |
59*cc02d7e2SAndroid Build Coastguard WorkerCase insensitive prefix/full path matching:<ul><li>[case_sensitive](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-routematch) can be true or false</li></ul> | | v1.34.0 | v1.34.0 | v1.34.0 | v1.3.0 |
60*cc02d7e2SAndroid Build Coastguard WorkerSupport for [xDS v3 APIs](https://www.envoyproxy.io/docs/envoy/latest/api-v3/api) | [A30](https://github.com/grpc/proposal/blob/master/A30-xds-v3.md) | v1.36.0 | v1.36.0 | v1.36.0 | v1.4.0 |
61*cc02d7e2SAndroid Build Coastguard WorkerSupport for [xDS v2 APIs](https://www.envoyproxy.io/docs/envoy/latest/api/api_supported_versions) | [A27](https://github.com/grpc/proposal/blob/master/A30-xds-v3.md#details-of-the-v2-to-v3-transition) | < v1.51.0  | < v1.53.0 | < v1.54.0 | < v1.8.0 |
62*cc02d7e2SAndroid Build Coastguard Worker[Maximum Stream Duration](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routeaction-maxstreamduration):<ul><li>Only max_stream_duration is supported.</li></ul> | [A31](https://github.com/grpc/proposal/blob/master/A31-xds-timeout-support-and-config-selector.md) | v1.37.1  | v1.37.1 | v1.37.0 | v1.4.0 |
63*cc02d7e2SAndroid Build Coastguard Worker[Circuit Breaking](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/circuit_breaker.proto):<ul><li>Only max_requests is supported.</li></ul> | [A32](https://github.com/grpc/proposal/blob/master/A32-xds-circuit-breaking.md) | v1.37.1 (N/A for PHP) | v1.37.1 | v1.37.0 | v1.4.0 |
64*cc02d7e2SAndroid Build Coastguard Worker[Fault Injection](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/fault/v3/fault.proto):<br> Only the following fields are supported:<ul><li>delay</li><li>abort</li><li>max_active_faults</li><li>headers</li></ul> | [A33](https://github.com/grpc/proposal/blob/master/A33-Fault-Injection.md) | v1.37.1  | v1.37.1 | v1.37.0 | v1.4.0 |
65*cc02d7e2SAndroid Build Coastguard Worker[Client Status Discovery Service](https://github.com/envoyproxy/envoy/blob/main/api/envoy/service/status/v3/csds.proto) | [A40](https://github.com/grpc/proposal/blob/master/A40-csds-support.md) | v1.37.1 (C++)<br>v1.38.0 (Python)  | v1.37.1 | v1.37.0 | v1.5.0 |
66*cc02d7e2SAndroid Build Coastguard Worker[Aggregate Clusters](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/aggregate_cluster.html) and [Logical DNS Clusters](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/service_discovery.html#logical-dns) | [A37](https://github.com/grpc/proposal/blob/master/A37-xds-aggregate-and-logical-dns-clusters.md) | v1.47.0 | v1.39.0 | v1.52.2 | v1.9.0 |
67*cc02d7e2SAndroid Build Coastguard WorkerAggregate Cluster Behavior Fixes | [A75](https://github.com/grpc/proposal/blob/master/A75-xds-aggregate-cluster-behavior-fixes.md) | v1.61.0 | | | |
68*cc02d7e2SAndroid Build Coastguard Worker[Ring hash](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#ring-hash) load balancing policy:<br> Only the following [policy specifiers](https://github.com/envoyproxy/envoy/blob/2443032526cf6e50d63d35770df9473dd0460fc0/api/envoy/config/route/v3/route_components.proto#L706) are supported:<ul><li>header</li><li>filter_state with key `io.grpc.channel_id`</li></ul>Only [`XX_HASH`](https://github.com/envoyproxy/envoy/blob/2443032526cf6e50d63d35770df9473dd0460fc0/api/envoy/config/cluster/v3/cluster.proto#L383) function is supported. | [A42](https://github.com/grpc/proposal/blob/master/A42-xds-ring-hash-lb-policy.md) | v1.40.0<br>(C++ and Python) | v1.40.1 | 1.41.0 | v1.10.0 |
69*cc02d7e2SAndroid Build Coastguard Worker[Retry](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-retrypolicy):<br>Only the following fields are supported:<ul><li>retry_on for the following conditions: cancelled, deadline-exceeded, internal, resource-exhausted, and unavailable.</li><li>num_retries</li><li>retry_back_off</li></ul> | [A44](https://github.com/grpc/proposal/blob/master/A44-xds-retry.md) | v1.40.0<br>(C++ and Python) | v1.40.1 | 1.41.0 | v1.8.0 |
70*cc02d7e2SAndroid Build Coastguard Worker[Security](https://www.envoyproxy.io/docs/envoy/latest/configuration/security/security):<br>Uses [certificate providers](https://github.com/grpc/proposal/blob/master/A29-xds-tls-security.md#certificate-provider-plugin-framework) instead of SDS | [A29](https://github.com/grpc/proposal/blob/master/A29-xds-tls-security.md) | v1.41.0<br>(C++ and Python) | v1.41.0 | 1.41.0 | |
71*cc02d7e2SAndroid Build Coastguard Worker[Authorization (RBAC)](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/rbac/v3/rbac.proto):<br><ul><li>`LOG` action has no effect<li>CEL unsupported and rejected</ul> | [A41](https://github.com/grpc/proposal/blob/master/A41-xds-rbac.md) | v1.51.0<br>(C++ and Python) | v1.42.0 | 1.42.0 | |
72*cc02d7e2SAndroid Build Coastguard Worker[Least Request LB Policy](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers.html#weighted-least-request) | [A48](https://github.com/grpc/proposal/blob/master/A48-xds-least-request-lb-policy.md) |  | v1.48.0 |  |  |
73*cc02d7e2SAndroid Build Coastguard Worker[Outlier Detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier):<br>Only the following detection types are supported:<ul><li>Success Rate</li><li>Failure Percentage</li></ul> | [A50](https://github.com/grpc/proposal/blob/master/A50-xds-outlier-detection.md) | v1.51.0 | v1.49.0 | v1.50.0 | v1.7.0 |
74*cc02d7e2SAndroid Build Coastguard Worker[Custom Load Balancer Configuration](https://github.com/envoyproxy/envoy/blob/57be3189ffa3372b34e9480d1f02b2d165e49077/api/envoy/config/cluster/v3/cluster.proto#L1208) | [A52](https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md) | v1.55.0 | v1.47.0 | v1.56.0 | v1.10.0 |
75*cc02d7e2SAndroid Build Coastguard Worker[xDS Federation](https://github.com/cncf/xds/blob/main/proposals/TP1-xds-transport-next.md) | [A47](https://github.com/grpc/proposal/blob/master/A47-xds-federation.md) | v1.55.0 | v1.55.0 | v1.55.0 | |
76*cc02d7e2SAndroid Build Coastguard Worker[Client-Side Weighted Round Robin LB Policy](https://github.com/envoyproxy/envoy/blob/a6d46b6ac4750720eec9a49abe701f0df9bf8e0a/api/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto#L36) | [A58](https://github.com/grpc/proposal/blob/master/A58-client-side-weighted-round-robin-lb-policy.md) | v1.55.0 | v1.54.0 | v1.56.0 | |
77*cc02d7e2SAndroid Build Coastguard WorkerPick First | [A62](https://github.com/grpc/proposal/blob/master/A62-pick-first.md) | v1.58.0 | v1.58.1 | v1.56.0 | |
78*cc02d7e2SAndroid Build Coastguard Worker[StringMatcher for Header Matching](https://github.com/envoyproxy/envoy/blob/3fe4b8d335fa339ef6f17325c8d31f87ade7bb1a/api/envoy/config/route/v3/route_components.proto#L2280) | [A63](https://github.com/grpc/proposal/blob/master/A63-xds-string-matcher-in-header-matching.md) | v1.56.0 | v1.53.0 | v1.56.0 | v1.9.0 |
79*cc02d7e2SAndroid Build Coastguard WorkerLRS Custom Metrics Support | [A64](https://github.com/grpc/proposal/blob/master/A64-lrs-custom-metrics.md) | v1.54.0 | | | |
80*cc02d7e2SAndroid Build Coastguard WorkermTLS Credentials in xDS Bootstrap File | [A65](https://github.com/grpc/proposal/blob/master/A65-xds-mtls-creds-in-bootstrap.md) | v1.57.0 | | v1.61.0 | |
81*cc02d7e2SAndroid Build Coastguard WorkerStateful Session Affinity | [A55](https://github.com/grpc/proposal/blob/master/A55-xds-stateful-session-affinity.md), [A60](https://github.com/grpc/proposal/blob/master/A60-xds-stateful-session-affinity-weighted-clusters.md), [A75](https://github.com/grpc/proposal/blob/master/A75-xds-aggregate-cluster-behavior-fixes.md) | v1.61.0 | | | |
82