When an application calls a service, the service provider that resides in the same zone as the application is called first. This is how the Intra-zone Provider First feature works. In Enterprise Distributed Application Service (EDAS), you can enable the Intra-zone Provider First feature for Spring Cloud, Dubbo, and High-speed Service Framework (HSF) applications. This topic describes how to enable the feature for applications that are deployed on Elastic Compute Service (ECS) clusters.
If no provider is available in the same zone as the consumer application, the consumer application calls a provider in another zone.
Enable the Intra-zone Provider First feature
To enable the Intra-zone Provider First feature, you can set the Intra-zone Provider First parameter on the application details page of the service provider.
- Log on to the EDAS console.
- In the left-side navigation pane, click Applications. In the top navigation bar, select a region. On the Applications page, select a microservice namespace in the upper part and click the name of a specific application that is deployed on an ECS cluster.
- In the Application Settings section of the Basic Information page, enable the Intra-zone Provider First feature and specify a threshold.Note The threshold indicates the ratio of the number of instances where applications are deployed in the current zone to the total number of instances. The Intra-zone Provider First feature takes effect only when the threshold is exceeded. Valid values of the threshold: 0 to 100.