Cloud-native gateways allow you to configure timeout policies at the route level. In timeout policies, you can specify the maximum period of time in which your gateway waits for responses to requests for a specified route based on your business requirements. If the gateway does not receive a response from the backend service within the specified period of time, the gateway returns the 504 (Gateway Timeout) status code to the client. This topic describes how to configure a route timeout policy for a cloud-native gateway.
Procedure
Log on to the MSE console. In the top navigation bar, select a region.
In the left-side navigation pane, choose Cloud-native Gateway > Gateways. On the Gateways page, click the name of the gateway.
In the left-side navigation pane, click Routes, and click the Routes tab.
Find the routing rule that you want to modify, and click Policies in the Actions column.
On the Policies tab, click Timeout.
In the Timeout section, configure the parameters and click Save.
Parameter
Description
Timeout Period
The timeout period for the current route. Unit: seconds.
NoteIf you set this parameter to 0 or keep the timeout policy disabled, the gateway waits for responses all the time.
Enable
Specifies whether to enable the timeout policy.
If you turn on the switch, the timeout policy takes effect.
If you turn off the switch, the timeout policy does not take effect.
After the timeout policy is created and enabled, you can check whether the timeout policy takes effect based on your business requirements.