masquee / learn-envoy

0 stars 0 forks source link

理解 Envoy 路由 #2

Open masquee opened 3 years ago

masquee commented 3 years ago

RouteConfiguration

https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route.proto.html#config-route-v3-routeconfiguration

{
  "name": "...",
  "virtual_hosts": [],
  "vhds": "{...}",
  "internal_only_headers": [],
  "response_headers_to_add": [],
  "response_headers_to_remove": [],
  "request_headers_to_add": [],
  "request_headers_to_remove": [],
  "most_specific_header_mutations_wins": "...",
  "validate_clusters": "{...}"
}

RouteConfigurationvirtual_hosts list 可以理解为路由表。

masquee commented 1 year ago

Envoy route config 中的 weighted_clusters

config.route.v3.RouteAction

https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routeaction


image

对应的 Istio VirtualService 配置

image

Traffic Splitting

https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/traffic_splitting#config-http-conn-man-route-table-traffic-splitting-split