Microservice Governance in Enterprise Distributed Application Service (EDAS) allows you to create a service timeout rule for a multi-language application without the need to modify the business code. After you create a service timeout rule for an application, if the application fails to process a request within the specified timeout period, a timeout error is returned. This prevents the consumer applications from waiting a large amount of time.

Create a service timeout rule

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, choose Microservices Governance > Service Mesh.
  3. In the left-side navigation tree of the Service Mesh page, click Service Timeout Period Setting.
  4. Select a region in the top navigation bar. Select a microservice namespace from the Microservice Namespace drop-down list and click Create rule.
  5. In the Create service timeout rule panel, set the parameters and click OK.
    Create a service timeout rule in EDAS

    The following table describes the parameters.

    Parameter Description
    Microservice Space The region and microservice namespace where the application resides.
    Rule name The name of the service timeout rule, such as timeout-example.
    Application The application for which you want to create the service timeout rule.
    Tag The tag that implements tag-based routing.
    Status Specifies whether to enable the service timeout rule.
    • On: enables the rule after it is created.
    • Off: disables the rule after it is created. To enable the rule, find the rule on the Service Timeout Period Setting page and click Open in the Operation column.
    Protocol type The type of the application framework. Default value: Service Mesh.
    Traffic sources The one or more consumer applications that send requests. You can select All or specify specific applications.
    Note A timeout error can be returned based on the rule only if the consumer application that sends the request is specified for this parameter.
    The timeout response time The timeout period of requests. If the application fails to process a request within the specified period, a timeout error is returned. Unit: milliseconds.
    After the service timeout rule is created and enabled, check whether the rule takes effect.

Related operations

After you create a service timeout rule, you can click Edit, Close, or Open in the Operation column to manage the rule. If the service timeout rule is no longer required, you can click Delete to delete the rule.