跳至正文
Wener Notes

xds

约 2 分钟阅读

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

  • xDS API - 一套 DP API - Mesh CP <-> Proxies
    • 用于 gRPC Mesh - xds://pkg.service
    • gRPC 集成了 xDS grpc.Dial("xds:///my-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
  • gRPC Proxyless
  • Proxyless Service Mesh
  • 控制面
  • 数据面
    • Envoy, MOSN, AeroFS
  • UDPA - Universal Data Plane API
    • 服务发现,负载均衡分配,路由发现,监听器配置,安全发现,负载报告,运行状况检查委托
  • 参考
RoleFor
gRPC高性能通信
Kubernetes服务注册、服务发现、健康检测
Istio路由、负载,服务治理:熔断、重拾,安全:认证、mTLS,可观察性:trace、log、metrics

gRPC xDS

json
{
  // 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": ""
  }
}

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

GitHub7 条
其他外链2 条
最近更新commit 24d4348编辑