All Products
Search
Document Center

Enterprise Distributed Application Service:Enable the Intra-zone Provider First feature

Last Updated:Jan 16, 2024

If your service providers are deployed across zones, you can enable the Intra-zone Provider First feature to facilitate calls by service consumers. In this case, the provider that is deployed in the same zone as the service consumer is preferentially called. This helps prevent network latency caused by cross-zone service calls and shortens the HTTP response time. You can enable the Intra-zone Provider First feature for applications that use Spring Cloud, Dubbo, and High-speed Service Framework (HSF) frameworks. This topic describes how to enable the Intra-zone Provider First feature for service providers in Kubernetes clusters.

Background information

If applications are deployed in multiple zones, applications may call each other across zones. For example, in the following figure, Application A in Zone 1 calls Application B in Zone 2. That is, an application on Node A1 calls an application on Node B2. Cross-zone calls may increase network latency and extend the HTTP response time. The following figure shows sample call links.

image

After the Intra-zone Provider First feature is enabled, the service consumer preferentially calls the service provider in the same zone. This prevents network latency caused by cross-zone service calls and shortens the HTTP response time. The following figure shows sample call links.

image

If no provider is available in the same zone as the consumer, the consumer calls a provider in another zone.

Procedure

You can perform the following operations in the Enterprise Distributed Application Service (EDAS) console to enable the Intra-zone Provider First feature:

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region, select a microservices namespace from the Microservices Namespace drop-down list, select Kubernetes Cluster from the Cluster Type drop-down list, and then click the name of the desired application.

  3. In the Service Governance section of the Application Overview page, enable Same zone priority.

  4. In the Service Governance section of the Application Overview page, click the 编辑 icon next to Same zone priority and configure Threshold.

    Note
    • The Intra-zone Provider First feature takes effect only when the ratio of the number of instances in the current zone to the total number of instances is greater than the specified threshold. Valid values of the threshold: 0 to 100.

    • You must set Dmse.enable to true for the feature to take effect. For more information, see Configure Java startup parameters.