首页 > 其他分享 >Istio从入门到精通—— 流量治理的原理 —— VirutalService —— HTTPRoute

Istio从入门到精通—— 流量治理的原理 —— VirutalService —— HTTPRoute

时间:2023-12-11 15:14:21浏览次数:38  
标签:redirect HTTP HTTPRoute No Istio will traffic VirutalService match

流量治理的原理 —— VirutalService —— HTTPRoute

https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRoute

  Describes match conditions and actions for routing HTTP/1.1, HTTP2, and gRPC traffic. See VirtualService for usage examples.

描述了用于路由 HTTP/1.1、HTTP2 和 gRPC 流量的匹配条件和操作。有关使用示例,请参阅 VirtualService。

Field Type Description Required
name string

The name assigned to the route for debugging purposes. The route’s name will be concatenated with the match’s name and will be logged in the access logs for requests matching this route/match.

用于调试目的而分配给路由的名称。路由的名称将与匹配项的名称连接起来,并将在与该路由/匹配项匹配的请求的访问日志中进行记录。

No
match HTTPMatchRequest[]

Match conditions to be satisfied for the rule to be activated. All conditions inside a single match block have AND semantics, while the list of match blocks have OR semantics. The rule is matched if any one of the match blocks succeed.

No
route HTTPRouteDestination[]

A HTTP rule can either return a direct_response, redirect or forward (default) traffic. The forwarding target can be one of several versions of a service (see glossary in beginning of document). Weights associated with the service version determine the proportion of traffic it receives.

No
redirect HTTPRedirect

A HTTP rule can either return a direct_response, redirect or forward (default) traffic. If traffic passthrough option is specified in the rule, route/redirect will be ignored. The redirect primitive can be used to send a HTTP 301 redirect to a different URI or Authority.

No
directResponse HTTPDirectResponse

A HTTP rule can either return a direct_response, redirect or forward (default) traffic. Direct Response is used to specify a fixed response that should be sent to clients.

It can be set only when Route and Redirect are empty.

No
delegate Delegate

Delegate is used to specify the particular VirtualService which can be used to define delegate HTTPRoute.

It can be set only when Route and Redirect are empty, and the route rules of the delegate VirtualService will be merged with that in the current one.

NOTE:

  1. Only one level delegation is supported.
  2. The delegate’s HTTPMatchRequest must be a strict subset of the root’s, otherwise there is a conflict and the HTTPRoute will not take effect.
No
rewrite HTTPRewrite

Rewrite HTTP URIs and Authority headers. Rewrite cannot be used with Redirect primitive. Rewrite will be performed before forwarding.

No
timeout Duration

Timeout for HTTP requests, default is disabled.

No
retries HTTPRetry

Retry policy for HTTP requests.

No
fault HTTPFaultInjection

Fault injection policy to apply on HTTP traffic at the client side. Note that timeouts or retries will not be enabled when faults are enabled on the client side.

No
mirror Destination

Mirror HTTP traffic to a another destination in addition to forwarding the requests to the intended destination. Mirrored traffic is on a best effort basis where the sidecar/gateway will not wait for the mirrored cluster to respond before returning the response from the original destination. Statistics will be generated for the mirrored destination.

No
mirrors HTTPMirrorPolicy[]

Specifies the destinations to mirror HTTP traffic in addition to the original destination. Mirrored traffic is on a best effort basis where the sidecar/gateway will not wait for the mirrored destinations to respond before returning the response from the original destination. Statistics will be generated for the mirrored destination.

No
mirrorPercentage Percent

Percentage of the traffic to be mirrored by the mirror field. If this field is absent, all the traffic (100%) will be mirrored. Max value is 100.

No
corsPolicy CorsPolicy

Cross-Origin Resource Sharing policy (CORS). Refer to CORS for further details about cross origin resource sharing.

No
headers Headers

Header manipulation rules

No

标签:redirect,HTTP,HTTPRoute,No,Istio,will,traffic,VirutalService,match
From: https://www.cnblogs.com/zuoyang/p/17894447.html

相关文章

  • Istio与Kubernetes:资源管理与协同解析
    本文分享自华为云社区《istio资源介绍以及和kubernetes资源扭转关系》,作者:可以交个朋友。一、istio原理Istio的原理是拦截Kubernetes中创建Pod的事件,然后向Pod中注入一个包含Envoy的容器,进出Pod的流量会被“劫持”到Envoy进行处理。由于流量被“劫持”了,所以Istio......
  • Istio从入门到精通—— 流量治理的原理 —— 故障注入
     流量治理的原理——故障注入一、故障注入的概念 流量治理的原理中的故障注入是一种重要的技术手段,用于评估和提升系统的可靠性。其基本原理是在系统正常运行时,人为地引入一些故障,以测试系统的健壮性和容错能力。通过这种方式,我们可以发现并解决系统中可能存在的问题,从而确......
  • Istio 入门(六):版本控制
    目录VirtualService和DestinationRuleVirtualService与Service的关系VirtualService和DestinationRule的关系VirtualService的定义DestinationRule的定义完整系统教程电子书阅读地址:https://istio.whuanle.cn/VirtualService和DestinationRuleVirtualService与Serv......
  • k8s之istio
    .Istio介绍Istio是一个开源的服务网格(ServiceMesh),为Kubernetes和其他平台上的微服务架构提供了一种统一的、灵活的网络通信和管理方式。具有服务发现、负载均衡、流量管理、故障恢复和安全性等功能。以下是Istio的一些基本特性:代理注入:Istio使用Envoy作为其数据面代理,通过注入......
  • 云原生周刊:Istio 1.20.0 发布 | 2023.11.20
    开源项目推荐DevPodDevPod是一款纯客户端工具,可在任何后端基于devcontainer.json创建可重现的开发人员环境。每个开发者环境都在一个容器中运行,并通过devcontainer.json进行指定。通过DevPod提供商,这些环境可以在任何后端创建,如本地计算机、Kubernetes集群、任何可访问......
  • Istio从入门到精通—— Istio 的主要组件
    Istio的主要组件 Istio主要由控制面组件和数据面组件组成。Istio1.20.0(https://github.com/istio/istio/releases/download/1.20.0/istio-1.20.0-linux-arm64.tar.gz)默认安装的组件如下:EnvoySidecarproxiespermicroservicetohandleingress/egres......
  • Istio从入门到精通——Istio 能做什么?
    Istio能做什么? 下面通过一个天气预报应用展示Istio的服务访问形式。其中有两个服务:forecast和recommendation。forecast由Node.js开发而成,recommendation由Java开发而成。这两个服务之间通过最简单的服务名进行调用,在代码中只实现最简单的业务处理,不包含额外的服务......
  • Istio从入门到精通——Istio 概念介绍
    Istio概念介绍一、流量管理https://istio.io/latest/docs/concepts/traffic-management/ Istio’strafficroutingrulesletyoueasilycontroltheflowoftrafficandAPIcallsbetweenservices.Istiosimplifiesconfigurationofservice-levelpropertieslike......
  • 《全网最细-深度解析 Istio Ambient Mesh 流量路径》摘要
    ----NodeA首次上行--------APREROUTING-jztunnel-PREROUTING-Aztunnel-PREROUTING-ptcp-mset--match-setztunnel-pods-ipssrc-jMARK--set-xmark0x100/0x100-Aztunnel-PREROUTING-mmark--mark0x100/0x100-jACCEPTfromallfwmark0x100/0x100lookup101101......
  • 五分钟k8s实战-Istio 网关
    在上一期k8s-服务网格实战-配置Mesh中讲解了如何配置集群内的Mesh请求,Istio同样也可以处理集群外部流量,也就是我们常见的网关。其实和之前讲到的k8s入门到实战-使用IngressIngress作用类似,都是将内部服务暴露出去的方法。只是使用Istio-gateway会更加灵活。这里有......