هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Configuring API Cascading

Updated on 2022-12-05 GMT+08:00

Overview

API cascading allows you to cascade two ROMA Connect instances in the same region or different regions so that one instance can use an API of the other instance as its backend service, thereby implementing cross-instance API calling. A dedicated authentication channel will be used for API calling between the two instances that establish the cascading relationship. This can prevent an authentication conflict in API cascading scenarios.

  • The instance that uses an API of the other instance as its backend service can be called a cascading instance.
  • The instance that provides its API to the other instance as a backend service can be called a cascaded instance.

With the API cascading function, API providers can provide APIs in one instance to another instance to improve the reuse capability of API assets and avoid repeatedly deploying backend services in different instances.

Prerequisites

  • The cascading and cascaded instances can communicate with each other.
  • If the cascading and cascaded instances are located in different networks and they communicate with each other through an air wall, the IP address and port number of the instances must be configured on the air wall. In addition, the TCP protocol must be used on the air wall to establish network paths in ferry mode. A dedicated VPN or tunnel can also be used to implement cross-network interworking.

Procedure

  1. Enable the cascading function on the cascaded instance.
    1. Log in to the ROMA Connect console on which the cascaded instance is located. On the Instances page, click View Console.
    2. On the Instance Information page, click the Configuration Parameters tab and locate the cascade parameter.
    3. Click Edit on the right of the parameter, set Current Value to on, and click Save.
    4. Click on the left of the parameter to expand and set the parameters related to the cascading function.
      Table 1 Parameters related to the cascading function

      Parameter

      Description

      cascade_auth_key

      Encryption key used for authentication between APIs in the cascading relationship. The cascade_auth_key value of the cascaded instance must be the same as that of the cascading instance.

      cascade_instance_ids

      ID list of cascading instances. Only instances specified by this parameter can establish the cascading relationship with the current instance. Use commas (,) to separate multiple instance IDs. A maximum of five instance IDs can be configured.

  2. Enable the cascading function on the cascading instance.
    1. Log in to the ROMA Connect console on which the cascading instance is located. On the Instances page, click View Console.
    2. On the Instance Information page, click the Configuration Parameters tab and locate the cascade parameter.
    3. Click Edit on the right of the parameter, set Current Value to on, and click Save.
    4. Click on the left of the parameter to expand and set the cascading parameters.
      Table 2 Parameters related to the cascading function

      Parameter

      Description

      cascade_auth_key

      Encryption key used for calling authentication between APIs in cascading relationship. The cascade_auth_key value of the cascaded instance must be the same as that of the cascading instance.

      cascade_instance_ids

      ID list of cascading instances. You do not need to set this parameter in the cascading instance.

  3. Create a load balance channel from the cascading instance to the cascaded instance.
    1. In the navigation pane of the cascading instance console, choose API Connect > API Management. On the Load Balance Channels tab page, click Create.
    2. On the Create Load Balance Channel page, configure basic information and health check information and click Next.
      Table 3 Parameters in Basic Information and Health Check Configuration

      Parameter

      Description

      Name

      Enter a load balance channel name. It is recommended that you enter a name based on naming rules to facilitate search.

      Port

      Enter the access port number of the ECS in the load balance channel. You can determine the port number based on the protocol used by the API in the cascaded instance. For HTTP, set this parameter to 80. For HTTPS, set this parameter to 443.

      Member Type

      Select the member type of a server in the load balance channel. To access an API of the cascaded instance, select IP address for Member Type.

      Distribution Algorithm

      Select a distribution algorithm for backend service requests. The load balance channel determines the server to which the request is to be sent based on the distribution algorithm.

      Protocol

      Select the protocol used for the health check. The value can be TCP, HTTP, or HTTPS.

      Path

      This parameter is mandatory only if Protocol is set to HTTP or HTTPS.

      Enter the health check URL.

      Method

      This parameter is available only if Protocol is set to HTTP or HTTPS.

      Select the HTTP request method used for the health check. The value can be GET or HEAD.

      Advanced Settings

      Health Check Port

      Enter the destination port of the health check. By default, the port number configured for the load balance channel is used.

      Healthy Threshold

      Number of consecutive successful checks required for an ECS to be considered healthy. For example, if Healthy Threshold is set to 2, ROMA Connect considers the ECS status as healthy when the check is successful for two consecutive times.

      Unhealthy Threshold

      Number of consecutive failed checks required for an ECS to be considered unhealthy. For example, if Unhealthy Threshold is set to 5, ROMA Connect considers the ECS status as abnormal when the check fails for five consecutive times.

      Timeout (s)

      Enter the response timeout duration of a health check, in the unit of seconds. If no response is received within the specified duration, the health check fails.

      Interval (s)

      Interval between consecutive checks.

      Response Codes

      This parameter is mandatory only if Protocol is set to HTTP or HTTPS.

      When the server returns a specified HTTP response code, the server considers the response as successful. Multiple response codes can be specified at the same time.

    3. Click Add Backend Server Address. On the page displayed, configure the IP address of the cascaded instance.
      Table 4 Backend server information

      Parameter

      Description

      Backend Server Address

      Enter the API access address of the cascaded instance.

      • If you use the IP address format:
        • Set this parameter to the EIP of the cascaded instance if the cascading and cascaded instances communicate with each other over a public network based on the EIP.
        • Set this parameter to the APIC connection address of the cascaded instance if the cascading and cascaded instances communicate with each other over an intranet.
      • If you use the domain name format, enter the access domain name of the API.

      Weight

      This parameter is mandatory only if WRR or WLC is selected for Distribution Algorithm of the load balance channel.

      Enter the weight of the backend server. A larger weight indicates that more requests will be forwarded to the backend server.

    4. Click Finish.
  4. On the cascading instance, create an API and set the backend address to the API in the cascaded instance.

    For details about how to create an API, see Creating an API. Only the configuration of defining the backend service is different. The following table describes the different configuration.

    Table 5 Backend service access parameters

    Parameter

    Description

    Backend Type

    Select a backend service type. When the API of the cascaded instance is used as the backend service, select HTTP/HTTPS.

    Protocol

    Set this parameter based on the request protocol of the API in the cascaded instance.

    Request Mode

    Set this parameter based on the API request method used in the cascaded instance.

    Load Balancing

    Determine whether to use a load balance channel to access backend services. When the API of the cascaded instance is used as the backend service, select Configure now.

    Load Balance Channel

    Select the load balance channel created in 3.

    Cascading Flag

    Determine whether to use the cascading mode to access backend services. Enable this option.

    Host Header

    Define the Host header field carried in the backend service request. If you have specified Backend Server Address with an IP address when creating a load balance channel in, set Host Header to the domain name of the API of the cascaded instance.

    Path

    Enter the request path of the backend service in the /getUserInfo/{userId} format. The request path can contain the path parameter in the format of {Parameter name}.

    If the path needs to contain an environment variable, enclose the environment variable in number signs (#), for example, /#path#. Multiple environment variables can be added, for example, /#path##request#.

    Timeout (ms)

    Enter the timeout interval of a backend service request. The default value is 5000.

    Two-way Authentication

    This parameter is mandatory only if Protocol is set to HTTPS.

    Determine whether to enable two-way authentication between ROMA Connect and backend services. When the API of the cascaded instance is used as the backend service, do not enable two-way authentication.

    Backend Authentication

    Determine whether to enable backend authentication. When the API of the cascaded instance is used as the backend service, do not enable backend authentication.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback