Skip to main content
Version: 1.1-beta

Routing

Routing refers to the process by which an API Gateway forwards client requests to the appropriate backend service based on specific paths or conditions. An API Gateway is a middleware layer that sits between clients and servers, used for managing, monitoring, and routing client API requests. Its routing functionality is one of the core features of an API Gateway.

In an API Gateway, routing is typically based on conditions such as URL paths, HTTP methods (e.g., GET, POST), request headers, query parameters, and more. When the API Gateway receives a client request, it decides which backend service to forward the request to based on pre-configured routing rules.

Operation Demonstrationโ€‹

Adding a Routeโ€‹

  1. Select the service you need to configure and enter its details page.

  1. Click on "Route".

  1. Click on "Add Route".

  1. Fill in the basic information for the route.

Field Descriptions

Field NameField Description
Intercept this requestWhether to intercept the requests of this interface
Request MethodSupports common HTTP request methods like GET, POST, PUT, DELETE, and allows multiple selections
Request PathURI of the API, applied to the relative path in the request URL, supports Restful parameters and prefix matching
Advanced MatchingSupports routing matches through request headers, parameters, and Cookies; allows multiple entries
Forward Upstream PathThe relative path to be forwarded upstream
Request TimeoutDefines the timeout for the gateway to forward requests and receive responses from upstream
Retry CountWhen forwarding requests to upstream fails, the gateway will automatically retry, with a maximum retry count
Forward Upstream HeadersAllows creating, editing, and deleting parameters for forward upstream headers, primarily used for authentication between gateway and upstream

Once completed, click the "Submit" button.

Editing a Routeโ€‹

  1. Click the Edit button next to the route you want to edit.

  1. Fill in the route information.

After filling, click Submit.

Deleting a Routeโ€‹

  1. Click the Delete button next to the route you want to delete.

  1. In the pop-up window, click Confirm.