xDS API endpoints
Below we describe endpoints for the v3 transport API.
POST /envoy.service.cluster.v3.ClusterDiscoveryService/StreamClusters
See cds.proto for the service definition. This is used by Envoy as a client when
is set in the of the Bootstrap config.
POST /envoy.service.endpoint.v3.EndpointDiscoveryService/StreamEndpoints
See for the service definition. This is used by Envoy as a client when
resource_api_version: V3
api_config_source:
api_type: GRPC
transport_api_version: V3
grpc_services:
envoy_grpc:
cluster_name: some_xds_cluster
is set in the eds_cluster_config field of the config.
POST /envoy.service.listener.v3.ListenerDiscoveryService/StreamListeners
See lds.proto for the service definition. This is used by Envoy as a client when
lds_config:
resource_api_version: V3
api_config_source:
api_type: GRPC
transport_api_version: V3
grpc_services:
envoy_grpc:
cluster_name: some_xds_cluster
is set in the of the Bootstrap config.
POST /envoy.service.route.v3.RouteDiscoveryService/StreamRoutes
See for the service definition. This is used by Envoy as a client when
route_config_name: some_route_name
config_source:
resource_api_version: V3
api_type: GRPC
transport_api_version: V3
grpc_services:
cluster_name: some_xds_cluster
is set in the rds field of the config.
POST /envoy.service.route.v3.ScopedRoutesDiscoveryService/StreamScopedRoutes
See srds.proto for the service definition. This is used by Envoy as a client when
is set in the field of the HttpConnectionManager config.
POST /envoy.service.secret.v3.SecretDiscoveryService/StreamSecrets
name: some_secret_name
config_source:
resource_api_version: V3
api_config_source:
api_type: GRPC
transport_api_version: V3
grpc_services:
envoy_grpc:
cluster_name: some_xds_cluster
is set inside a message. This message is used in various places such as the CommonTlsContext.
POST /envoy.service.runtime.v3.RuntimeDiscoveryService/StreamRuntime
See for the service definition. This is used by Envoy as a client when
name: some_runtime_layer_name
config_source:
resource_api_version: V3
api_config_source:
api_type: GRPC
transport_api_version: V3
grpc_services:
envoy_grpc:
cluster_name: some_xds_cluster
is set inside the rtds_layer field.
POST /v3/discovery:clusters
See for the service definition. This is used by Envoy as a client when
cds_config:
api_config_source:
transport_api_version: V3
cluster_names: [some_xds_cluster]
is set in the dynamic_resources of the config.
POST /v3/discovery:endpoints
See eds.proto for the service definition. This is used by Envoy as a client when
is set in the field of the Cluster config.
POST /v3/discovery:listeners
See for the service definition. This is used by Envoy as a client when
lds_config:
resource_api_version: V3
api_config_source:
api_type: REST
transport_api_version: V3
cluster_names: [some_xds_cluster]
is set in the dynamic_resources of the config.
POST /v3/discovery:routes
See rds.proto for the service definition. This is used by Envoy as a client when
route_config_name: some_route_name
config_source:
resource_api_version: V3
api_config_source:
api_type: REST
transport_api_version: V3
cluster_names: [some_xds_cluster]
is set in the field of the HttpConnectionManager config.
Note
While Envoy fundamentally employs an eventual consistency model, ADS provides an opportunity to sequence API update pushes and ensure affinity of a single management server for an Envoy node for API updates. ADS allows one or more APIs and their resources to be delivered on a single, bidirectional gRPC stream by the management server. Without this, some APIs such as RDS and EDS may require the management of multiple streams and connections to distinct management servers.
ADS will allow for hitless updates of configuration by appropriate sequencing. For example, suppose foo.com was mapped to cluster X. We wish to change the mapping in the route table to point foo.com at cluster Y. In order to do this, a CDS/EDS update must first be delivered containing both clusters X and Y.
Without ADS, the CDS/EDS/RDS streams may point at distinct management servers, or when on the same management server at distinct gRPC streams/connections that require coordination. The EDS resource requests may be split across two distinct streams, one for X and one for Y. ADS allows these to be coalesced to a single stream to a single management server, avoiding the need for distributed synchronization to correctly sequence the update. With ADS, the management server would deliver the CDS, EDS and then RDS updates on a single stream.
ADS is only available for gRPC streaming (not REST) and is described more fully in document. The gRPC endpoint is:
POST /envoy.service.discovery.v3.AggregatedDiscoveryService/StreamAggregatedResources
See discovery.proto for the service definition. This is used by Envoy as a client when
ads_config:
api_type: GRPC
transport_api_version: V3
grpc_services:
envoy_grpc:
cluster_name: some_ads_cluster
is set in the of the Bootstrap config.
When this is set, any of the configuration sources can be set to use the ADS channel. For example, a LDS config could be changed from
to
lds_config: {ads: {}}
with the effect that the LDS stream will be directed to some_ads_cluster over the shared ADS channel.
The REST, filesystem, and original gRPC xDS implementations all deliver “state of the world” updates: every CDS update must contain every cluster, with the absence of a cluster from an update implying that the cluster is gone. For Envoy deployments with huge amounts of resources and even a trickle of churn, these state-of-the-world updates can be cumbersome.
As of 1.12.0, Envoy supports a “delta” variant of xDS (including ADS), where updates only contain resources added/changed/removed. Delta xDS is a gRPC (only) protocol. Delta uses different request/response protos than SotW (DeltaDiscovery{Request,Response}); see discovery.proto. Conceptually, delta should be viewed as a new xDS transport type: there is static, filesystem, REST, gRPC-SotW, and now gRPC-delta. (Envoy’s implementation of the gRPC-SotW/delta client happens to share most of its code between the two, and something similar is likely possible on the server side. However, they are in fact incompatible protocols. .)
To use delta, simply set the api_type field of your ApiConfigSource proto(s) to DELTA_GRPC. That works for both xDS and ADS; for ADS, it’s the api_type field of , as described in the previous section.
When using xDS, users might find themself wanting to temporarily update certain xDS resources. In order to do safely, xDS TTLs can be used to make sure that if the control plane becomes unavailable and is unable to revert the xDS change, Envoy will remove the resource after a TTL specified by the server. See the protocol documentation for more information.
Currently the behavior when a TTL expires is that the resource is removed (as opposed to reverted to the previous version). As such, this feature should primarily be used for use cases where the absence of the resource is preferred instead of the temporary version, e.g. when using RTDS to apply a temporary runtime override.
The TTL is specified on the proto: for Delta xDS this is specified directly within the response, while for SotW xDS the server may wrap individual resources listed in the response within a Resource in order to specify a TTL value.
The server can refresh or modify the TTL by issuing another response for the same version. In this case the resource itself does not have to be included.