Firstsawyou commented on a change in pull request #4092: URL: https://github.com/apache/apisix/pull/4092#discussion_r617383782
########## File path: docs/en/latest/plugins/traffic-split.md ########## @@ -482,6 +483,98 @@ Content-Type: text/html; charset=utf-8 hello 1980 ``` +### Matching rules correspond to upstream + +How to make different matching rules correspond to different upstreams. We can achieve this by configuring multiple `rules.match` + `rules.weighted_upstreams`. Review comment: This is feasible, updated. ########## File path: docs/en/latest/plugins/traffic-split.md ########## @@ -482,6 +483,98 @@ Content-Type: text/html; charset=utf-8 hello 1980 ``` +### Matching rules correspond to upstream + +How to make different matching rules correspond to different upstreams. We can achieve this by configuring multiple `rules.match` + `rules.weighted_upstreams`. + +**Example:** + +When the request header `x-api-id` is equal to 1, it hits the upstream of port 1981; when `x-api-id` is equal to 2, it hits the upstream of port 1982; otherwise, it hits the upstream of port 1980 (the upstream response data is the corresponding port number). Review comment: Updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org