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

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
Managed Threat Detection
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

Forwarding Policy

Updated on 2025-02-19 GMT+08:00

Overview

You can configure forwarding policies for HTTP or HTTPS listeners to forward requests to different backend server groups based on domain names or paths.

A forwarding policy consists of two parts: forwarding rule and action. For details, see Table 1.

Table 1 Rules and actions supported by a forwarding policy

Policy Type

Forwarding Rules

Actions

Forwarding policy

Domain name and Path

Forward to another backend server group and Redirect to another listener (only for HTTP listeners)

Advanced forwarding policy

Domain name, Path, HTTP request method, HTTP header, Query string, and CIDR block

Forward to another backend server group, Redirect to another listener, Rewrite, Write header, Remove header, Limit request, and Return a specific response body

NOTE:

You can configure an advanced forwarding policy by referring to Managing an Advanced Forwarding Policy.

How Requests Are Matched

  • After receiving a request, the load balancer attempts to find a matching forwarding policy based on the domain name or path in the request:
    • If a match is found, the request is forwarded to the backend server group you select or create when you add the forwarding policy.
    • If no match is found, the request is forwarded to the default backend server group that is specified when the listener is created.
    • If both a domain name and path are configured for a forwarding policy, the request can match the forwarding policy only when the domain name and path are both met.
  • If advanced forwarding is not enabled for a dedicated load balancer, the matching order is determined by the following rules:
    • When a request matches both a domain name-based policy and a path-based policy, the domain named-based policy is matched first. Table 2 shows an example.
    • Forwarding policy priorities are independent of each other regardless of domain names.
    • Path-based forwarding rules are applied in the following order of priority: an exact match rule, a prefix match rule, and a regular expression match rule. For multiple matches of the same type, only the longest path rule will be applied.
Table 2 Example forwarding policies

Request

Forwarding Policy

Forwarding Rule

Specified Value

www.elb.com/test

1

Path

/test

2

Domain name

www.elb.com

NOTE:

In this example, although request www.elb.com/test matches both forwarding policies, it is routed based on forwarding policy 2 because domain named-based forwarding rules are applied first.

Notes and Constraints

  • Forwarding policies can be configured only for HTTP and HTTPS listeners.
  • Forwarding policies must be unique.
  • A maximum of 100 forwarding policies can be configured for a listener. If the number of forwarding policies exceeds the quota, the excess forwarding policies will not be applied.
  • When you add a forwarding policy, note the following:
    • The URL in a forwarding rule can contain only a path but cannot contain query strings. For example, if the path is set to /path/resource?name=value, the forwarding policy is invalid.
    • Each path must exist on the backend server. If the path does not exist, the backend server will return 404 Not Found.
    • In the regular expression match, the characters are matched sequentially, and the matching ends when any rule is matched. Matching rules cannot overlap with each other.
    • A path cannot be configured for two forwarding policies.
    • A domain name cannot exceed 100 characters.

Adding a Forwarding Policy

  1. Go to the load balancer list page.
  2. On the displayed page, locate the load balancer you want to add forwarding policy for and click its name.
  3. On the Listeners tab, add a forwarding policy in either of the following ways:
    • Locate the target listener and click Add/Edit Forwarding Policy in the Forwarding Policies column.
    • Locate the target listener, click its name, and click the Forwarding Policies tab.
  4. Click Add Forwarding Policy. Configure the parameters based on Table 3.
    Table 3 Forwarding policy parameters

    Parameter

    Type

    Description

    Example Value

    Forwarding Rule

    Domain name

    Specifies the domain name that will be exactly matched against the domain names in requests.

    You need to specify either a domain name or path.

    www.test.com

    Path

    • Description

      Specifies the path used for forwarding requests. A path can contain letters, digits, and special characters: _~';@^-%#$.*+?,=!:|\/()[]{}

    • Matching rules
      • Exact match: The request path is the same as the specified path and must start with a slash (/).
      • Prefix match: The request path starts with the specified path string and must start with a slash (/).
      • Regular expression match: The paths are matched using a regular expression.

    /login.php

    Action

    Forward to a backend server group

    Specifies the backend server group to which a request is routed if it matches the configured forwarding rule.

    N/A

    Redirect to another listener

    Specifies the HTTPS listener to which a request is routed if it matches the configured forwarding rule.

    This action can be configured only for HTTP listeners.

    NOTE:

    If you select Redirect to another listener, the HTTP listener will redirect requests to the specified HTTPS listener, but access control configured for the HTTP listener still takes effect.

    N/A

  5. Click Save.

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