<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## HTTP路由管理和路由發現(RDS) - [RouteConfiguration](#routeconfiguration) - [VirtualHost](#virtualhost) - [VirtualHost.TlsRequirementType (Enum)](#virtualhosttlsrequirementtype-enum) - [Route](#route) - [WeightedCluster](#weightedcluster) - [WeightedCluster.ClusterWeight](#weightedclusterclusterweight) - [RouteMatch](#routematch) - [CorsPolicy](#corspolicy) - [RouteAction](#routeaction) - [RouteAction.RetryPolicy](#routeactionretrypolicy) - [RouteAction.RequestMirrorPolicy](#routeactionrequestmirrorpolicy) - [RouteAction.HashPolicy](#routeactionhashpolicy) - [RouteAction.HashPolicy.Header](#routeactionhashpolicyheader) - [RouteAction.HashPolicy.Cookie](#routeactionhashpolicycookie) - [RouteAction.HashPolicy.ConnectionProperties](#routeactionhashpolicyconnectionproperties) - [RouteAction.ClusterNotFoundResponseCode (Enum)](#routeactionclusternotfoundresponsecode-enum) - [RedirectAction](#redirectaction) - [RedirectAction.RedirectResponseCode (Enum)](#redirectactionredirectresponsecode-enum) - [Decorator](#decorator) - [VirtualCluster](#virtualcluster) - [RateLimit](#ratelimit) - [RateLimit.Action](#ratelimitaction) - [RateLimit.Action.SourceCluster](#ratelimitactionsourcecluster) - [RateLimit.Action.DestinationCluster](#ratelimitactiondestinationcluster) - [RateLimit.Action.RequestHeaders](#ratelimitactionrequestheaders) - [RateLimit.Action.RemoteAddress](#ratelimitactionremoteaddress) - [RateLimit.Action.GenericKey](#ratelimitactiongenerickey) - [RateLimit.Action.HeaderValueMatch](#ratelimitactionheadervaluematch) - [HeaderMatcher](#headermatcher) ### RouteConfiguration [RouteConfiguration proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L35) - [路由架構概述](../Introduction/Architectureoverview/HTTProuting.md) - [HTTP路由過濾器](../Configurationreference/HTTPfilters/Router.md) ``` { "name": "...", "virtual_hosts": [], "internal_only_headers": [], "response_headers_to_add": [], "response_headers_to_remove": [], "request_headers_to_add": [], "validate_clusters": "{...}" } ``` - **name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 路由配置的名稱。例如,它可能會匹配[filter.network.Rds](../v2APIreference/Filters/Networkfilters/HTTPconnectionmanager.md)中的`route_config_name`。 - **virtual_hosts**<br /> ([VirtualHost](#virtualhost)) 一組虛擬主機組成的路由表。 - **internal_only_headers**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) (可選)指定做為內部使用的HTTP頭部字段列表。如果在外部請求中找到它們,則會在過濾器調用之前清除它們。有關更多信息,請參見[x-envoy-internal](../Configurationreference/HTTPconnectionmanager/HTTPheadermanipulation.md)。 - **response_headers_to_add**<br /> ([HeaderValueOption](../v2APIreference/Commontypes.md#headervalueoption)) 指定在連接管理器編碼時,為每個響應的增加HTTP頭部字段列表。在這個級別指定的頭部將位于內部的[VirtualHost](#virtualhost)或[RouteAction](#routeaction)的頭部之后。 - **response_headers_to_remove**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定在連接管理器編碼每個響應中需要刪除的HTTP頭部字段列表。 - **request_headers_to_add**<br /> ([HeaderValueOption](../v2APIreference/Commontypes.md#headervalueoption)) 指定在HTTP連接管理器路由的每個請求時,需要添加的HTTP頭部字段列表。在這個級別指定的頭部將位于內部的[VirtualHost](#virtualhost)或[RouteAction](#routeaction)的頭部之后。有關更多信息,請參閱自定義請求的頭部字段[文檔](../Configurationreference/HTTPconnectionmanager/HTTPheadermanipulation.md)。 - **validate_clusters**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 可選的bool類型,指定路由表引用的集群是否由集群管理器驗證。如果設置為true,并且路由引用了不存在的集群,則路由表將不會加載。如果設置為false,并且路由引用不存在的集群,則路由表將加載,如果在運行時選擇路由,則路由器過濾器將返回404。如果路由表是通過[route_config](../v2APIreference/Filters/Networkfilters/HTTPconnectionmanager.md)選項靜態定義的,則此配置默認為true。如果路由表是通過[rds](../v2APIreference/Filters/Networkfilters/HTTPconnectionmanager.md)選項動態加載的,則此設置默認為false。用戶可以在某些情況下覆蓋此默認行為(例如,當使用帶有靜態路由表的CDS時)。 ### VirtualHost [VirtualHost proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L87) 在路由配置的頂層選項有個虛擬主機。每個虛擬主機都有一個邏輯名稱以及一組根據傳入請求的主機頭路由到它的域。這允許單個監聽端口多個頂級域服務。一旦基于域選擇了虛擬主機,就會根據順序處理那些路由匹配到哪個上游集群,并且是否執行重定向。 ``` { "name": "...", "domains": [], "routes": [], "require_tls": "...", "virtual_clusters": [], "rate_limits": [], "request_headers_to_add": [], "response_headers_to_add": [], "response_headers_to_remove": [], "cors": "{...}" } ``` - **name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 虛擬主機的邏輯名稱。用于某些統計信息,但與路由無關。 - **domains**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 將與此虛擬主機相匹配的域(主機名)列表。支持通配符,例如:支持“.foo.com”或“-bar.foo.com”。 注意:通配符將不匹配空字符串。例如“-bar.foo.com”將匹配“baz-bar.foo.com”,但不匹配“-bar.foo.com”。此外,還可以使用特殊的條目“”來匹配任何主機名。整個路由配置中只有一臺虛擬主機可以匹配“*”。域名在所有虛擬主機中必須是唯一的,否則配置將無法加載。 - **routes**<br /> ([Route](#route)) 將按順序匹配傳入請求的路由列表。第一個匹配的路由將被使用。 - **require_tls**<br /> ([VirtualHost.TlsRequirementType](#virtualhosttlsrequirementtype-enum)) 指定虛擬主機所提供的TLS類型。如果未指定此選項,則虛擬主機不需要TLS。 - **virtual_clusters**<br /> ([VirtualCluster](#virtualcluster)) 為此虛擬主機定義的虛擬集群列表。虛擬集群用于進行其他統計信息收集。 - **rate_limits**<br /> ([RateLimit](#ratelimit)) 指定將應用于虛擬主機的一組限速配置。 - **request_headers_to_add**<br /> ([HeaderValueOption](../v2APIreference/Commontypes.md#headervalueoption)) 指定添加到由此虛擬主機處理的每個請求的HTTP頭部列表。在此級別指定的頭部將應用于內部的[RouteAction](#routeaction)頭部之后和封裝[RouteConfiguration](#routeconfiguration)的頭部之前。有關更多信息,請參閱自定義請求頭的[文檔](../Configurationreference/HTTPconnectionmanager/HTTPheadermanipulation.md)。 - **response_headers_to_add**<br /> ([HeaderValueOption](../v2APIreference/Commontypes.md#headervalueoption)) 指定添加到由此虛擬主機處理的每個響應的HTTP頭部列表。在此級別指定的頭部將應用于內部的[RouteAction](#routeaction)頭部之后和封裝[RouteConfiguration](#routeconfiguration)的頭部之前。 - **response_headers_to_remove**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定由此虛擬主機處理的每個響應中刪除的HTTP頭部列表。 - **cors**<br /> ([CorsPolicy](#corspolicy)) 表示虛擬主機具有CORS策略。 ### VirtualHost.TlsRequirementType (Enum) [VirtualHost.TlsRequirementType proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L110) - **NONE**<br /> (DEFAULT) 虛擬主機沒有TLS要求。 - **EXTERNAL_ONLY**<br /> 來自外部請求必須使用TLS。如果請求是來自外部的,并且沒有使用TLS,則將發送301重定向,告訴客戶端使用HTTPS。 - **ALL**<br /> 所有請求都必須使用TLS。 如果請求沒有使用TLS,則會發送301重定向,通知客戶端使用HTTPS。 ### Route [Route proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L167) 路由既包括匹配那些請求,以及接下來需要執行的行為(例如,重定向,轉發,重寫等)。 注意:Envoy通過頭匹配支持HTTP方法的路由。 ``` { "match": "{...}", "route": "{...}", "redirect": "{...}", "metadata": "{...}", "decorator": "{...}" } ``` - **match**<br /> ([RouteMatch](#routematch), REQUIRED) 路由匹配參數。 - **route**<br /> ([RouteAction](#routeaction)) 將請求路由到某個上游群集。 - **redirect**<br /> ([RedirectAction](#redirectaction)) 返回一個重定向。 注意:路由和重定向必須選擇其中一個設置。 - **metadata**<br /> ([Metadata](../v2APIreference/Commontypes.md#metadata)) 元數據字段可用于提供有關路由的其他信息。 它可以用于配置,統計和日志記錄。元數據應該在與之對應的濾器命名空間下。例如,如果此元數據用于路由器過濾器,則應將過濾器名稱指定為`envoy.router`。 - **decorator**<br /> ([Decorator](#decorator)) 匹配路由的標識符。 ### WeightedCluster [WeightedCluster proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L202) 與指定單個上游群集作為請求目標的群集字段相比,`weighted_clusters`選項允許指定多個上游群集以及制定要轉發給每個群集的流量百分比的權重。路由器將根據權重選擇上游集群。 ``` { "clusters": [], "runtime_key_prefix": "..." } ``` - **clusters**<br /> ([WeightedCluster.ClusterWeight](#weightedclusterclusterweight), REQUIRED) 指定與路由關聯的一個或多個上游群集。 - **runtime_key_prefix**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定應該用于構造與每個集群關聯的運行時key/value前綴。當指定`runtime_key_prefix`時,路由器將在`runtime_key_prefix+"."+cluster[i].name`下查找與每個上游集群相關的權重,其中`cluster[i]`表示集群組的某個集群。如果群集的運行時key不存在,則配置文件中指定的值將用作默認權重。有關鍵名稱如何映射到底層實現,請參閱[運行時文檔](../Operationsandadministration/Runtime.md)。 ### WeightedCluster.ClusterWeight [WeightedCluster.ClusterWeight proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L203) ``` { "name": "...", "weight": "{...}", "metadata_match": "{...}" } ``` - **name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 上游群集的名稱。群集必須存在于群集管理器配置中。 - **weight**<br /> ([UInt32Value](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#uint32value)) 一個0~100之間的整數,當請求與路由匹配時,選擇上游集群的權重。集群組中所有集群的權重總和加起來必須為100。 - **metadata_match**<br /> ([Metadata](../v2APIreference/Commontypes.md#metadata)) (可選)端口元數據匹配條件,將僅考慮上游集群中具有與在`metadata_match`中設置的元數據匹配的端口,過濾器名稱應該指定為`envoy.lb`。 ### RouteMatch [RouteMatch proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L233) ``` { "prefix": "...", "path": "...", "regex": "...", "case_sensitive": "{...}", "runtime": "{...}", "headers": [] } ``` - **prefix**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 如果指定,則路由采用匹配前綴規則,這意味著前綴必須匹配`:path`頭部分。 - **path**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 如果指定,路由是一個精確的路徑規則,意味著一旦查詢字符串被移除,路徑必須與`:path`頭完全匹配。 - **regex**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 如果指定,則路由采用正則表達式規則,這意味著一旦查詢字符串被移除,正則表達式必須匹配`:path`頭。整個路徑(不含查詢字符串)必須匹配正則表達式。如果只有`:path`頭的部分與正則表達式匹配,則實際規則為不匹配。這里定義了正則表達式語法。 實例: - 正則表達式`/b[io]t` 匹配路徑 `/bit` - 正則表達式`/b[io]t` 匹配路徑 `/bot` - 正則表達式`/b[io]t` 不匹配路徑 `/bite` - 正則表達式`/b[io]t` 不匹配路徑 `/bit/bot` 注意:只能選擇`prefix`, `path`, `regex`其中一個設置。 - **case_sensitive**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 表示前綴/路徑匹配是否不區分大小寫。默認值是true。 - **runtime**<br /> ([RuntimeUInt32](../v2APIreference/Commontypes.md#runtimeuint32)) 指定當前路由匹配另外運行時的key。設置一個0-100之間的整數,每當路由匹配時,將會產生一個0-99之間的隨機數。如果該隨機數<=當前設置的值(首先檢查)或者該key不存在,則默認行為,則匹配該路徑(假定所有路徑都與路由匹配)。可以在運行時逐步進行路由的變更,而無需完整的部署配置。請參閱[流量轉移](../Configurationreference/HTTPconnectionmanager/TrafficShiftingSplitting.md)文檔以獲取詳細的說明。 - **headers**<br /> ([HeaderMatcher](#headermatcher)) 指定路由匹配的一組頭部字段。路由器將檢查請求的頭域中與該配置中的頭部字段。如果路由配置中的所有頭部字段都在請求頭部匹配相同的值(或者路由配置的key存在,而value沒有明確),則匹配將發生。 ### CorsPolicy [CorsPolicy proto]() ``` { "allow_origin": [], "allow_methods": "...", "allow_headers": "...", "expose_headers": "...", "max_age": "...", "allow_credentials": "{...}", "enabled": "{...}" } ``` - **allow_origin**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定將被允許執行CORS請求的來源。 - **allow_methods**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定`access-control-allow-methods`頭部的內容。 - **allow_headers**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定`access-control-allow-headers`頭部的內容。 - **expose_headers**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定`access-control-expose-headers`頭部的內容。 - **max_age**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定`access-control-max-age`頭部的內容。 - **allow_credentials**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 指定資源是否允許憑據。 - **enabled**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 指定是否啟用CORS。默認為true。只在路由上有效。 ### RouteAction [RouteAction proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L306) ``` { "cluster": "...", "cluster_header": "...", "weighted_clusters": "{...}", "cluster_not_found_response_code": "...", "metadata_match": "{...}", "prefix_rewrite": "...", "host_rewrite": "...", "auto_host_rewrite": "{...}", "timeout": "{...}", "retry_policy": "{...}", "request_mirror_policy": "{...}", "priority": "...", "request_headers_to_add": [], "response_headers_to_add": [], "response_headers_to_remove": [], "rate_limits": [], "include_vh_rate_limits": "{...}", "hash_policy": [], "use_websocket": "{...}", "cors": "{...}" } ``` - **cluster**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指示請求路由到的上游群集。 注意:只能選擇`cluster`, `cluster_header`, `weighted_clusters`其中一個設置。 - **cluster_header**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) Envoy將通過從請求頭中讀取以`cluster_header`命名的HTTP頭的值來明確要路由的群集。如果沒有找到引用的群集,Envoy將返回一個404響應。 注意:在內部,Envoy始終使用HTTP/2的`:authority`頭來表示HTTP/1的`Host`頭。因此,如果試圖在使用`Host`匹配,則使用`:authority`替代。 注意:只能選擇`cluster`, `cluster_header`, `weighted_clusters`其中一個設置。 - **weighted_clusters**<br /> ([WeightedCluster](#weightedcluster)) 可以為該路由指定多個上游群集。根據每個群集的權重,將請求路由到其中一個上游群集。請參閱[流量拆分](../Configurationreference/HTTPconnectionmanager/TrafficShiftingSplitting.md)以獲取詳細說明。 注意:只能選擇`cluster`, `cluster_header`, `weighted_clusters`其中一個設置。 - **cluster_not_found_response_code**<br /> ([RouteAction.ClusterNotFoundResponseCode](#routeactionclusternotfoundresponsecode-enum)) 未找到配置的群集時使用的HTTP狀態碼。默認響應碼是503,服務不可用。 - **metadata_match**<br /> ([Metadata](../v2APIreference/Commontypes.md#metadata))(可選)端口元數據匹配條件,將僅考慮上游集群中具有與在`metadata_match`中設置的元數據匹配的端口,過濾器名稱應該指定為`envoy.lb`。 - **prefix_rewrite**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 表示在轉發過程中,匹配的前綴(或路徑)重寫的值。此選項允許應用程序的URLs使用不同的路徑(通過反向代理層公開的路徑)。 - **host_rewrite**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 表示在轉發過程中,主機頭將重寫的值。 注意:只能選擇`host_rewrite`, `auto_host_rewrite`其中一個設置。 - **auto_host_rewrite**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 表示在轉發過程中,主機頭將與群集管理器選擇的上游主機的主機名交換。此選項僅適用于目標群集的類型為`strict_dns`或`logical_dns`。對于其他群集類型設置為true將無效。 注意:只能選擇`host_rewrite`, `auto_host_rewrite`其中一個設置。 - **timeout**<br /> ([Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration)) 指定路由的超時時間。如果未指定,則默認值為15秒。 注意:該超時包括所有重試。 另請參閱[x-envoy-upstream-rq-timeout-ms](../Configurationreference/HTTPfilters/Router.md#x-envoy-upstream-rq-timeout-ms),[x-envoy-upstream-rq-per-try-timeout-ms](../Configurationreference/HTTPfilters/Router.md#x-envoy-upstream-rq-per-try-timeout-ms)和[重試概述](../Introduction/Architectureoverview/HTTProuting.md)。 - **retry_policy**<br /> ([RouteAction.RetryPolicy](#routeactionretrypolicy)) 表示該路由具有重試策略。 - **request_mirror_policy**<br /> ([RouteAction.RequestMirrorPolicy](#routeactionrequestmirrorpolicy)) 表示路由有請求鏡像策略。 - **priority**<br /> ([RoutingPriority](#routingpriority)) 可選,指定路由的優先級。 - **request_headers_to_add**<br /> ([HeaderValueOption](../v2APIreference/Commontypes.md#headervalueoption)) 指定將被添加到匹配此路由請求的一組頭。在這個級別指定的頭部將添加在`VirtualHost`和`RouteConfiguration`的頭部之前。有關更多信息,請參閱自定義請求頭的[文檔](../Configurationreference/HTTPconnectionmanager/HTTPheadermanipulation.md)。 - **response_headers_to_add**<br /> ([HeaderValueOption](../v2APIreference/Commontypes.md#headervalueoption)) 指定一組頭,這些頭將被添加到匹配此路由的請求響應中。在這個級別指定的頭部將添加在`VirtualHost`和`RouteConfiguration`的頭部之前。 - **response_headers_to_remove**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定一個HTTP頭的列表,將從匹配該路由的請求響應中刪除。 - **rate_limits**<br /> ([RateLimit](#ratelimit)) 指定可應用于該路由的一組速率限制配置。 - **include_vh_rate_limits**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 指定速率限制過濾器是否應包含虛擬主機速率限制。默認情況下,如果路由配置的速率限制,虛擬主機的`rate_limits`不適用于請求。 - **hash_policy**<br /> ([RouteAction.HashPolicy](#routeactionhashpolicy)) 指定用于環哈希負載平衡的哈希策略列表。每個散列策略都是單獨評估的,并且組合結果用于路由請求。組合的方法是確定性的,使得相同的散列策略列表將產生相同的散列。由于散列策略檢查請求的特定部分,因此可能無法產生散列(即散列頭不存在)。如果(且僅當)所有配置的散列策略未能生成散列,則不會為該路由生成散列。在這種情況下的行為與沒有指定哈希策略(即環哈希負載平衡器將隨機選擇后端)相同。 - **use_websocket**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 表示是否允許連接到該路由的HTTP/1.1客戶端升級到WebSocket連接。默認值是false。 注意:如果設置為true,Envoy會希望匹配這個路由的第一個請求包含WebSocket升級頭。如果頭不存在,連接將被拒絕。如果設置為true,Envoy將在客戶端和上游服務器之間設置純TCP代理。因此,拒絕WebSocket升級請求的上游服務器也需要負責關閉相應的連接。在此之前,Envoy將繼續將數據從客戶端代理到上游服務器。若該路由允許websocket升級,則不支持重定向,超時和重試。 - **cors**<br /> ([CorsPolicy](#corspolicy)) 表示該路由具有CORS策略。 ### RouteAction.RetryPolicy [RouteAction.RetryPolicy proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L380) HTTP重試[架構概述](../Introduction/Architectureoverview/HTTProuting.md)。 ``` { "retry_on": "...", "num_retries": "{...}", "per_try_timeout": "{...}" } ``` - **retry_on**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定重試觸發的條件。這些與`x-envoy-retry-on`和`x-envoy-retry-grpc-on`記錄的具有相同效果。 - **num_retries**<br /> ([UInt32Value](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#uint32value)) 指定允許的重試次數。此參數是可選的,默認值為1。這些與`x-envoy-max-retries`記錄的具有相同效果。 - **per_try_timeout**<br /> ([Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration)) 指定每個重試嘗試的超時時間,值為非零。該參數是可選的。為`x-envoy-upstream-rq-per-try-timeout-ms`記錄的相同條件適用。 注意:如果未指定,Envoy將使用全局路由超時請求。因此,當使用基于5xx的重試策略時,超時請求將不會被重試,因為總超時時長已經耗盡。 ### RouteAction.RequestMirrorPolicy [RouteAction.RequestMirrorPolicy proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L415) 路由器能夠將流量從一個集群映射到另一個集群。目前的實現是“fire and forget”,這意味著在返回來自主集群的響應之前,Envoy不會等待`shadow`集群作出響應。所有正常的統計數據都會被收集用于`shadow`集群,使得該功能對測試有用。 在遮蔽期間,`host/authority`頭部被改變,以便附加`-shadow`。這對于日志記錄很有用。例如,`cluster1`變為`cluster1-shadow`。 ``` { "cluster": "...", "runtime_key": "..." } ``` - **cluster**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 指定請求將被鏡像到的群集。群集必須存在于群集管理器配置中。 - **runtime_key**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 如果未指定,則將對目標群集的所有請求進行鏡像。如果指定,Envoy將查找運行時key以獲取請求的鏡像百分比。有效值為0到10000,支持0.01%的增幅。如果在配置中指定了運行時的key,但在運行過程中不存在,則默認為0,因此請求的0%將被鏡像。 ### RouteAction.HashPolicy [RouteAction.HashPolicy proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L463) 如果上游群集使用散列負載平衡器,則指定路由的散列策略。 ``` { "header": "{...}", "cookie": "{...}", "connection_properties": "{...}" } ``` - **header**<br /> ([RouteAction.HashPolicy.Header](#routeactionhashpolicyheader)) Header哈希策略。 - **cookie**<br /> ([RouteAction.HashPolicy.Cookie](#routeactionhashpolicycookie)) Cookie哈希策略。 - **connection_properties**<br /> ([RouteAction.HashPolicy.ConnectionProperties](#routeactionhashpolicyconnectionproperties)) 連接屬性的哈希策略。 注意:只能選擇`header`, `cookie`, `connection_properties`其中一個設置。 ### RouteAction.HashPolicy.Header [RouteAction.HashPolicy.Header proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L484) ``` { "header_name": "..." } ``` - **header_name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 將用于獲取哈希key的請求頭部名稱。如果請求頭不存在,則不會產生散列。 ### RouteAction.HashPolicy.Cookie [RouteAction.HashPolicy.Cookie proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L484) Envoy支持兩種類型的Cookie關聯: 1. 被動:Envoy需要一個存在于cookie頭部的cookie,并對其值進行哈希處理。 2. 產生:根據請求發送到的端口,Envoy會根據客戶端響應中的第一個請求生成并設置一個有效期(TTL)的cookie。然后,客戶端將在隨后的所有請求中進行攜帶這個散列以確保這些請求被發送到相同的端口。Cookie是通過散列源、目標端口和地址生成的,以便同一連接上的多個獨立的HTTP2流將獨立地接收相同的cookie,即使它們同時到達Enovy。 ``` { "name": "...", "ttl": "{...}" } ``` - **name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 將用于獲取散列key的cookie的名稱。 如果cookie不存在,并且下面的ttl沒有設置,則不會產生散列。 - **ttl**<br /> ([Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration)) 若指定,在cookie不存在的情況下,會生成一個帶有TTL的cookie。 ### RouteAction.HashPolicy.ConnectionProperties [RouteAction.HashPolicy.ConnectionProperties proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L495) ``` { "source_ip": "..." } ``` - **source_ip**<br /> ([bool](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 哈希源IP地址。 ### RouteAction.ClusterNotFoundResponseCode (Enum) [RouteAction.ClusterNotFoundResponseCode proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L333) - **SERVICE_UNAVAILABLE**<br /> (DEFAULT) HTTP狀態碼 - 503服務不可用。 - **NOT_FOUND**<br /> HTTP狀態碼 - 404未找到。 ### RedirectAction [RedirectAction proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L548) ``` { "host_redirect": "...", "path_redirect": "...", "response_code": "..." } ``` - **host_redirect**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 該主機的URL部分將與此值交換。 - **path_redirect**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 路徑的URL部分將與此值交換。 - **response_code**<br /> ([RedirectAction.RedirectResponseCode](#redirectactionredirectresponsecode-enum)) 在重定向響應中使用的HTTP狀態代碼。默認響應碼是MOVED_PERMANENTLY(301)。 ### RedirectAction.RedirectResponseCode (Enum) [RedirectAction.RedirectResponseCode proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L555) - **MOVED_PERMANENTLY**<br /> (DEFAULT) 永久轉移的HTTP狀態碼 - 301。 - **FOUND**<br /> Found HTTP狀態碼 - 302。 - **SEE_OTHER**<br /> See Other HTTP狀態碼 - 303。 - **TEMPORARY_REDIRECT**<br /> 臨時重定向HTTP狀態碼 - 307。 - **PERMANENT_REDIRECT**<br /> 永久重定向HTTP狀態碼 - 308。 ### Decorator [Decorator proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L577) ``` { "operation": "..." } ``` - **operation**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 與此路由匹配的請求相關聯的操作名稱。如果已啟用跟蹤,則將使用此信息作為為此請求記錄的span名稱。 注意:對于入口(入站)請求或出站(出站)響應,該值可能被`x-envoy-decorator-operation`頭覆蓋。 ### VirtualCluster [VirtualCluster proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L606) 虛擬集群是一種針對某些重要端口,指定正則表達式匹配規則的方法,例如為匹配的請求顯式生成統計信息。當做前綴/路徑匹配時這很有用,Envoy并不總是知道應用程序認為是一個端口。因此,Envoy不可能統一發送每個端口的統計數據。然而,系統往往具有高度關聯的端口,他們希望獲得“完美”的統計數據。虛擬集群統計是完美的,因為它們在下游散發,因此包含網絡級別的故障。 虛擬群集統計信息的[文檔](../Configurationreference/HTTPfilters/Router.md)。 注意:虛擬群集是一個有用的工具,但我們不建議為每個應用程序端口設置一個虛擬群集。 這既不容易維護,而且匹配和統計輸出也是需要代價的。 ``` { "pattern": "...", "name": "...", "method": "..." } ``` - **pattern**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 指定用于匹配請求的正則表達式模式。 請求的整個路徑必須匹配正則表達式。 所使用的正則表達式語法在這里定義。 示例: - 正則表達式 `/rides/d+` 匹配 `/rides/0` 路徑 - 正則表達式 `/rides/d+` 匹配 `/rides/123` 路徑 - 正則表達式 `/rides/d+` 不匹配 `/rides/123/456` 路徑 - **name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 指定虛擬群集的名稱。發布統計信息時會使用虛擬群集名稱和虛擬主機名稱。統計信息由路由器過濾器發出,并記錄在[此處](../Configurationreference/HTTPfilters/Router.md#statistics)。 - **method**<br /> ([RequestMethod](../v2APIreference/Commontypes.md#requestmethod-enum))(可選)指定要匹配的HTTP方法。例如GET,PUT等 ### RateLimit [RateLimit proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L629) 全局速率限制[架構概述](../Introduction/Architectureoverview/Globalratelimiting.md)。 ``` { "stage": "{...}", "disable_key": "...", "actions": [] } ``` - **stage**<br /> ([UInt32Value](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#uint32value)) 指在過濾器中設置的階段。速率限制配置僅適用于具有相同階段編號的過濾器。默認的階段編號是0。 注意:過濾器支持0~10范圍的階段編號。 - **disable_key**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 在運行時禁用此速率限制的key配置。 - **actions**<br /> ([RateLimit.Action](#ratelimitaction), REQUIRED) 此速率限制應用相關的操作列表。順序很重要,因為按順序處理操作的,描述符是通過在該順序中附加描述符條目來組成的。如果某個操作無法添加描述符條目,則不會為該配置生成描述符。請參閱相應的操作[文檔](../Configurationreference/HTTPfilters/Ratelimit.md)。 ### RateLimit.Action [RateLimit.Action proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L642) ``` { "source_cluster": "{...}", "destination_cluster": "{...}", "request_headers": "{...}", "remote_address": "{...}", "generic_key": "{...}", "header_value_match": "{...}" } ``` - **source_cluster**<br /> ([RateLimit.Action.SourceCluster](#ratelimitactionsourcecluster)) 基于源群集的速率限制。 - **destination_cluster**<br /> ([RateLimit.Action.DestinationCluster](#ratelimitactiondestinationcluster)) 基于目標群集的速率限制。 - **request_headers**<br /> ([RateLimit.Action.RequestHeaders](#ratelimitactionrequestheaders)) 基于請求頭的速率限制。 - **remote_address**<br /> ([RateLimit.Action.RemoteAddress](#ratelimitactionremoteaddress)) 基于遠程地址的速率限制。 - **generic_key**<br /> ([RateLimit.Action.GenericKey](#ratelimitactiongenerickey)) 基于通用密鑰的速率限制。 - **header_value_match**<br /> ([RateLimit.Action.HeaderValueMatch](#ratelimitactionheadervaluematch)) 請求頭的內容匹配的速率限制。 必須正確設置`source_cluster`,`destination_cluster`,`request_headers`,`remote_address`,`generic_key`,`header_value_match`其中的一個。 ### RateLimit.Action.SourceCluster [RateLimit.Action.SourceCluster proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L650) 以下描述符條目被追加到描述符中: ``` ("source_cluster", "<local service cluster>") ``` 其中`<local service cluster>`源自`--service-cluster`選項。 ``` {} ``` ### RateLimit.Action.DestinationCluster [RateLimit.Action.DestinationCluster proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L669) 以下描述符條目被追加到描述符中: ``` ("destination_cluster", "<routed target cluster>") ``` 一旦請求與路由表規則匹配,則選擇以下[路由表配置](../v2APIreference/HTTProutemanagementandRDS.md)設置之一路由集群: - [cluster](#routeaction):表示要到達的上游集群。 - [weighted_clusters](#routeaction):從一組具有權重屬性的集群組中隨機選擇一個集群。 - [cluster_header](#routeaction):指示請求的頭中選擇所包含目標群集。 ``` {} ``` ### RateLimit.Action.RequestHeaders [RateLimit.Action.RequestHeaders proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L678) 當一個頭包含一個與`header_name`匹配的關鍵字時,附加下面的描述符條目: ``` ("<descriptor_key>", "<header_value_queried_from_header>") ``` ``` { "header_name": "...", "descriptor_key": "..." } ``` - **header_name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 從匹配請求的頭部名稱。頭的值用于填充`descriptor_key`的描述符條目的值。 - **descriptor_key**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 在描述符條目中使用的key。 ### RateLimit.Action.RemoteAddress [RateLimit.Action.RemoteAddress proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L694) 以下描述符條目被追加到描述符中,并使用來自[x-forwarded-for](../Configurationreference/HTTPconnectionmanager/HTTPheadermanipulation.md#x-forwarded-for)的可信地址填充: ``` ("remote_address", "<trusted address from x-forwarded-for>") ``` ``` {} ``` ### RateLimit.Action.GenericKey [RateLimit.Action.GenericKey proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L702) 以下描述符條目被追加到描述符中: ``` ("generic_key", "<descriptor_value>") ``` ``` { "descriptor_value": "..." } ``` - **descriptor_value**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 描述符條目中使用的值。 ### RateLimit.Action.HeaderValueMatch [RateLimit.Action.HeaderValueMatch proto]() 以下描述符條目被追加到描述符中: ``` ("header_match", "<descriptor_value>") ``` ``` { "descriptor_value": "...", "expect_match": "{...}", "headers": [] } ``` - **descriptor_value**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 描述符條目中使用的值。 - **expect_match**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 如果設置為true,則該操作將在請求與頭部匹配時附加描述符條目。如果設置為false,則該操作將在請求不匹配頭部時附加描述符條目。默認值是true。 - **headers**<br /> ([HeaderMatcher](#headermatcher), REQUIRED) 指定速率限制操作應匹配的一組頭部字段。該動作將檢查請求的頭部與配置中的所有指定頭。如果配置中的所有頭都存在于具有相同值的請求中(或者如果值字段不在配置中則基于存在),則匹配將發生。 ### HeaderMatcher [HeaderMatcher proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/rds.proto#L778) 注意: 1. 在內部,Envoy始終使用HTTP/2的`:authority`頭來表示HTTP/1`Host`頭。因此,如果試圖在主機上匹配,則匹配`:authority`。 2. 要使用HTTP方法進行路由,請使用HTTP/2特殊的`:method`頭。這適用于HTTP/1和HTTP/2,做為Envoy標準化頭。例如。 ``` { "name": ":method", "value": "POST" } ``` ``` { "name": "...", "value": "...", "regex": "{...}" } ``` - **name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 指定請求的頭部名稱。 - **value**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 指定頭部的值。如果值不存在,則將匹配具有頭部的請求,而不關心具體的值。 - **regex**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 指定匹配頭部值是否采用正則表達式。默認為false。整個請求頭的值必須與正則表達式匹配。如果只有請求頭的值部分與正則表達式相匹配,則規定不匹配。這里定義了值字段中使用的正則表達式語法。 示例: - 正則表達式 `d{3}` 匹配值 `123` - 正則表達式 `d{3}` 不匹配值 `1234` - 正則表達式 `d{3}` 不匹配值 `123.456` ## 返回 - [上一級](../v2APIreference.md) - [首頁目錄](../README.md)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看