Enterprise Distributed Application Service (EDAS) allows you to configure a dynamic
timeout period for a service at the method level. 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.
Prerequisites
The Dubbo services can be queried in the EDAS console. For more information, see
Query Dubbo services.
Background information
You may configure timeout periods in various scenarios. If the business logic changes,
you may need to adjust the existing call 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.
Procedure
- 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, select an option from the microservice namespace drop-down list. Then, click a service name in the service list.
- In the Service Details panel, click Add in the Timeout Configuration section. In the Add Timeout Configuration panel, configure the parameters and click OK.
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 from the drop-down list. The asterisk (*) indicates
all consumer applications.
|
TimeOut (ms) |
Specify a timeout period for calls to the Dubbo application. The value must be an
integer greater than 0. Unit: milliseconds. This method-level timeout configuration
takes precedence over other timeout configurations at the same level.
|
The following content describes the priorities of various timeout configurations:
- Priorities of timeout configurations at the method or interface level: Method-level
timeout configurations in Enterprise Distributed Application Service (EDAS) > Method-level timeout configurations on clients or other sources > Interface-level
timeout configurations in EDAS > Interface-level timeout configurations on clients or other sources.
- Priorities of timeout configurations for service methods or consumer applications
- Timeout configurations for a specified service method > Timeout configurations for
all service methods. If you select an asterisk (*) from the Service method drop-down
list, the timeout configurations are effective for all service methods.
- Timeout configurations for a specified consumer application > Timeout configurations
for all consumer applications. If you select an asterisk (*) from the Consumer Application
drop-down list, the timeout configurations are effective for all consumer applications.
- If the settings of Service method and Consumer Application are the same, the new timeout
configuration takes precedence over the old timeout configuration.
After you configure a timeout period, you can view the added configuration in the
Timeout Configuration section of the Service Details panel.
Verify the result
Select a consumer application for which you configure a timeout period and use the
consumer application to call the Dubbo application.
Note If the timeout configuration is used for the first time, you may need to make multiple
calls to complete the verification.
To make the verification results more accurate, you can configure an extremely low
threshold for a call relationship that does not affect your business to trigger an
exception and view the result of the service call.
What to do next
You can add or delete timeout configurations. To modify an existing timeout configuration, you can add
a configuration and then delete the existing configuration.