All Products
Search
Document Center

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

Last Updated:Aug 09, 2023

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 in Elastic Compute Service (ECS) clusters.

Feature

When applications are deployed in multiple zones, applications may call each other across zones. The following figure shows sample call links. In this figure, Application A in Zone 1 calls Application B in Zone 2. The cross-zone call increases network latency. As a result, the HTTP response time is increased. 场景1

If the Intra-zone Provider First feature is enabled for a service application, the consumer application preferentially calls the provider that is deployed in the same zone. The following figure shows sample call links. The intra-zone call prevents network latency that is caused by the cross-zone call. This also reduces the HTTP response time. 场景2

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 configure the Intra-zone Provider First parameter on the application details page of the service provider.

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications.

  3. In the top navigation bar, select a region. In the upper part of the Applications page, select a microservice namespace and click the name of a specific application that is deployed in an ECS cluster.

  4. In the Application Settings section of the Basic Information tab, enable the Intra-zone Provider First feature and specify a threshold.

    开启同可用区优先
    Note

    The Intra-zone Provider First feature takes effect only when the ratio of the number of instances on which applications are deployed in the current zone to the total number of instances exceeds the specified threshold. Valid values of the threshold: 0 to 100.