All Products
Search
Document Center

Microservices Engine:Configure a timeout policy

Last Updated:Jun 29, 2023

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 responses from the backend service within the specified timeout period, the gateway returns HTTP status code 504 to the client.

Configure a timeout policy

  1. Log on to the MSE console.

  2. In the left-side navigation pane, choose Cloud-native Gateway > Gateway list. In the top navigation bar, select a region.

  3. On the Gateway list page, click the name of the gateway.

  4. In the left-side navigation pane, choose Routes > Route Settings.

  5. IOn the Routes page, find the routing rule that you want to modify, and click Policy Settings in the Actions column.

  6. In the Policy Settings section of the page that appears, click the Expiration tab.

    • If no timeout policy exists, click Configure policy.

    • If a timeout policy already exists, click the Edit icon icon on the right of Expiration.

  7. In the Expiration section, configure the parameters and click OK.

    Configure a timeout policy
    Table 1. Parameters

    Parameter

    Description

    Expiration Time

    The timeout period for the current route. Unit: seconds.

    Note

    If you set this parameter to 0 or keep the timeout policy disabled, the gateway waits for responses all the time.

    Enabled

    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.