Skip to main content

xds

最早由 Envoy 开发,用于构建 ServiceMesh 统一的 DP 接口。

  • xDS API - 一套 DP API - Mesh CP <-> Proxies
    • 用于 gRPC Mesh - xds://pkg.service
  • 负载均衡
    • LDS - Listener Discovery Service - type.googleapis.com/envoy.config.listener.v3.Listener
    • RDS - Route Discovery Service - type.googleapis.com/envoy.config.route.v3.RouteConfiguration
    • CDS - Cluster Discovery Service - type.googleapis.com/envoy.config.cluster.v3.Cluster
    • EDS - Endpoint Discovery Service - type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment
    • ADS - Aggregate Discovery Service - gRPC
  • 负载报告 - LRS
  • xDSv3
  • CP 实现
  • UDPA - Universal Data Plane API
    • 服务发现,负载均衡分配,路由发现,监听器配置,安全发现,负载报告,运行状况检查委托
  • 参考
RoleFor
gRPC高性能通信
Kubernetes服务注册、服务发现、健康检测
Istio路由、负载,服务治理:熔断、重拾,安全:认证、mTLS,可观察性:trace、log、metrics

gRPC xDS

{
// The xDS server to talk to. The value is an array to allow for a
// future change to add support for failing over to a secondary xDS server
// if the primary is down, but for now, only the first entry in the
// array will be used.
"xds_servers": [
{
"server_uri": "", //<string containing URI of xds server>,
// List of channel creds; client will stop at the first type it
// supports. This field is required and must contain at least one
// channel creds type that the client supports.
"channel_creds": [
{
"type": "", // google_default, insecure
// The "config" field is optional; it may be missing if the
// credential type does not require config parameters.
"config": "" //<JSON object containing config for the type>
}
],
"server_features": ["xds_v3"]
}
],
// JSON of proto
// https://github.com/envoyproxy/data-plane-api/blob/1adb5d54abb0e28ca409254d26fad1cf5535239b/envoy/api/v2/core/base.proto#L85-L118
"node": {
"id": "",
"cluster": "",
"metadata": {},
"locality": {
"region": "",
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
// https://cloud.google.com/compute/docs/regions-zones/
"zone": "",
"sub_zone": ""
},
"build_version": ""
}
}