Envoy XDS协议学习
Envoy xds学习
资料地址
- envoy官网资料连接
接口说明
- xds分为增量接口和全量接口
- SotW:state of the world 即全量的数据
- Incremental: 增量的数据
具体接口
- Listener: Listener Discovery Service (LDS)
SotW: ListenerDiscoveryService.StreamListeners
Incremental: ListenerDiscoveryService.DeltaListeners
- RouteConfiguration: Route Discovery Service (RDS)
SotW: RouteDiscoveryService.StreamRoutes
Incremental: RouteDiscoveryService.DeltaRoutes
- ScopedRouteConfiguration: Scoped Route Discovery Service (SRDS)
SotW: ScopedRouteDiscoveryService.StreamScopedRoutes
Incremental: ScopedRouteDiscoveryService.DeltaScopedRoutes
- VirtualHost: Virtual Host Discovery Service (VHDS)
SotW: N/A
Incremental: VirtualHostDiscoveryService.DeltaVirtualHosts
- Cluster: Cluster Discovery Service (CDS)
SotW: ClusterDiscoveryService.StreamClusters
Incremental: ClusterDiscoveryService.DeltaClusters
- ClusterLoadAssignment: Endpoint Discovery Service (EDS)
SotW: EndpointDiscoveryService.StreamEndpoints
Incremental: EndpointDiscoveryService.DeltaEndpoints
Secret: Secret Discovery Service (SDS)
SotW: SecretDiscoveryService.StreamSecrets
Incremental: SecretDiscoveryService.DeltaSecrets
- Runtime: Runtime Discovery Service (RTDS)
SotW: RuntimeDiscoveryService.StreamRuntime
Incremental: RuntimeDiscoveryService.DeltaRuntime
- ADS: 聚集接口,所有资源都使用一个接口
SotW: AggregatedDiscoveryService.StreamAggregatedResources
Incremental: AggregatedDiscoveryService.DeltaAggregatedResources
接口配置说明
- ApiConfigSource
- ConfigSource
ACK和NACK
- ACK
- NACK
接口发送
- SotW场景
- 客户端发送resource_names为空,则服务端理解为订阅*
- 客户端发送resource_names为和A,则服务端理解为继续订阅并新加一个A
- 客户端发送resource_names为A,则服务端理解为取消订阅*,并继续订阅A
- 客户端发送resource_names为空,则取消订阅A
- 增量场景
- 客户端发送resource_names_subscribe为空,则服务端理解为订阅*
- 客户端发送resource_names_subscribe为A,则继续订阅*和新加A
- 客户端发送resource_names_unsubscribe为*,则取消订阅*,继续订阅A
- 客户端发送resource_names_unsubscribe为A,则取消订阅A
网关路由一致性
- envoy是最终一致性的