Enterprise Distributed Application Service (EDAS) allows you to configure a dynamic timeout period at the method level for a service. This way, the timeout period dynamically changes based on the interface response time. This improves service governance. This topic describes how to configure a dynamic timeout period for Dubbo services.
You may configure timeout periods in various scenarios. If the business logic changes, you may need to adjust the existing calling relationship. The response time of a service interface can be determined only after the service is published. EDAS allows you to configure a dynamic timeout period for Dubbo services at the method level. This way, the timeout period for the services dynamically changes. This improves service availability.
- Log on to the EDAS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region. On the Service Query page, set Namespaces. Then, click a service name in the service list.
- In the Service Details panel, click Add in the Timeout Config section.
- In the Add Timeout Config panel, set the parameters and click Confirm.
The following table describes the parameters.
Parameter Description Service method Select a method to configure the current service. The asterisk (*) indicates all service interfaces. Consumer Application Select a consumer application for the current service. The asterisk (*) indicates all consumer applications. TimeOut (ms) Specify the timeout period for calls to the service interface. The value must be an integer greater than 0. Unit: milliseconds. This configuration takes precedence over other timeout configurations of the same level.
The following information shows the priorities of various timeout configurations for your reference:
After you add the timeout configuration, view it in the Timeout Config section of the Service Details panel.
- Priorities of timeout configurations at different levels: method-level timeout configurations in EDAS > method-level timeout configurations on clients or based on other configuration methods > interface-level timeout configurations in EDAS > interface-level timeout configurations on clients or based on other configuration methods.
- Priorities of timeout configurations on clients or based on other configuration methods:
- Timeout configuration of a specified service method > timeout configuration of all service methods when the asterisk (*) is selected.
- Timeout configuration of a specified consumer application > timeout configuration of all consumer applications when the asterisk (*) is selected.
- If the timeout configurations of service methods are the same as those of consumer applications, the following priorities are applicable: new timeout configurations > previous timeout configurations
Verify the result
Select a consumer application that needs to call the service for which you added the timeout configuration, and trigger a service call to verify the timeout configuration.
To make the verification results more apparent, you can set an extremely low threshold for a call relationship that does not affect the business to trigger an exception and view the result of the service call.
What to do next
In the timeout configuration records, the Add and Delete operations are provided. To modify a specific timeout threshold, you can add a record and then delete the previous record.