Cloud-native API Gateway evaluates routing rules from highest to lowest priority. If a request matches a rule, the gateway forwards it to the configured backend service. If no rules match, the gateway returns a 404 error.
Route matching priority
When multiple routing rules exist, they are prioritized as follows: Associated Domain Name > Path > Header > Query Parameters > Created At.
-
Associated Domain Name: Longer domain strings have higher priority.
-
Path:
-
If the Match Rule differ, the priority is: Equals To > Prefix > Regular Expression Match.
-
If the Match Rule are the same, longer Path values have higher priority.
-
-
Header: More key-value pairs mean higher priority.
-
Query Parameters: More key-value pairs mean higher priority.
-
Created At: Earlier creation times have higher priority.
Procedure
-
You can create a route from outside or inside a gateway instance.
Outside an instance
-
Log on to the Cloud-native API Gateway console. In the left-side navigation pane, click API, and then select a region.
-
Click the target API, then select the target instance or All Instances from the drop-down list.

-
Click Create Route.
Inside an instance
-
Log on to the Cloud-native API Gateway console. In the left-side navigation pane, click Instance, and then select a region.
-
On the Instance page, click the target gateway instance ID. In the left-side navigation pane, click API, and then click the target API.
-
Click Create Route.
-
-
On the Create Route page, configure the parameters, and then click Save or Save and Publish.
Note-
Match conditions use logical AND. More conditions narrow the matching scope.
-
Route priority follows the display order on the configuration page.
Parameter
Description
Route Name
Custom name for the route.
Route Description
Click Add Route Description to add a route description.
Domain Name
-
Select one or more domains to match.
-
To add a domain, click Add Domain and follow the on-screen instructions.
Path
Request path to match.
-
With the same match rule, longer paths have higher priority.
-
With different match rules, the priority is: Equals To > Prefix > Regular Expression Match.
-
Equals To: Matches the exact path, such as
/user. -
Prefix: Matches a path prefix, such as paths starting with
/user. -
Regular Expression Match: Matches a regular expression pattern.
-
Method
HTTP method to match. You can select multiple methods. Default: ANY.
Header
Request headers to match.
Query Parameters
Query parameters to match.
Instance
Gateway instance for this route.
Scenario
Backend service type for the route.
-
Basic scenario: Single Service
-
Canary release scenario: By Percentage (Multi-service), Tag (Tag-based Routing)
-
Other scenarios: Mock, Redirect
Backend service types are described in Routes.
NoteTraffic weights for all backend services must total 100%.
Backend Services
Backend service and port that this route forwards requests to.
Note-
Click Associated Service to select a source and service.
-
The maximum number of sources depends on the source type.
-
Container Service: up to 5 sources.
-
Nacos and Zookeeper: 1 source only.
-
Timeout Period (seconds)
Request timeout in seconds. Default: 60. Set to 0 to disable the timeout.
Fallback
Service that receives requests when the primary backend has no available nodes.
NoteFallback is supported only for HTTP services.
Retry Times
Number of retries. Default: 2. Set to 0 to disable retries.
Retry Condition
Conditions that trigger a retry.
Retry Status Code
Status codes that trigger a retry.
-