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 Kubernetes clusters.
In this figure, Application A in Zone 1 calls Application B in Zone 2, which means that the application on Node A1 calls the application on Node B2. The cross-zone call increases network latency. As a result, the HTTP response time is increased.
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 Same zone priority parameter for the service provider.
- Log on to the EDAS console.
- Go to the Application Overview page by using one of the following methods:
- In the left-side navigation pane, choose Container Service Kubernetes Clusters or Serverless Kubernetes Clusters page, click a cluster ID. In the Applications section of the Cluster Details page, click the name of the application that you want to manage. or . In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. On the
- In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list and click the name of the application that you want to manage.
- In the Service Governance section of the Application Overview page, click On to the right of Same zone priority.
- In the Service Governance section of the Application Overview page, click the icon to the right of Same zone priority 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.