Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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 (Dedicated Load Balancers)

Updated on 2024-04-18 GMT+08:00

Overview

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

A forwarding policy consists of one or more forwarding rules and an 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 URL

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

Advanced forwarding policy

Domain name, URL, HTTP request method, HTTP header, query string, and CIDR block

The following actions are supported: forward to a backend server group, redirect to another listener, redirect to another URL, and return a specific response body.

How Requests Are Matched

  • After you add a forwarding policy, the load balancer forwards requests based on the specified domain name or URL:
    • If the domain name or URL in a request matches that specified in the forwarding policy, the request is forwarded to the backend server group you create or select when you add the forwarding policy.
    • If the domain name or URL in a request does not match that specified in the forwarding policy, the request is forwarded to the default backend server group of the listener.
  • Matching priority:
    • Forwarding policy priorities are independent of each other regardless of domain names. If a forwarding rule uses both domain names and URLs, requests are matched based on domain names first.
    • If the forwarding rule is a URL, the priorities follow the order of exact match, prefix match, and regular expression match. If the matching types are the same, the longer the URL length, the higher the priority.
Table 2 Example forwarding policies

Request

Forwarding policy

Forwarding Rule

Specified Value

www.elb.com/test

1

URL

/test

2

Domain name

www.elb.com

NOTE:

In this example, request www.elb.com/test matches both forwarding policies 1 and 2, but is routed based on forwarding policy 2.

Notes and Constraints

  • You can add forwarding policies to 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:
    • Each URL path must exist on the backend server. Otherwise, the backend server returns 404 when you access the backend server.
    • In the regular expression match, the rules are matched sequentially, and matching ends when any rule is successfully matched. Matching rules cannot overlap with each other.
    • A URL path cannot be configured for two forwarding policies.
    • A domain name cannot exceed 100 characters.

Adding a Forwarding Policy

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Hover on in the upper left corner to display Service List and choose Network > Elastic Load Balance.
  4. On the Load Balancers page, locate the load balancer and click its name.
  5. On the Listeners tab page, add a forwarding policy in either of the following ways:
    • Click Add/Edit Forwarding Policy in the Forwarding Policies column.
    • Locate the target listener, click its name, and click Forwarding Policies.
  6. 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 used for forwarding requests. The domain name in the request must exactly match that in the forwarding policy.

    You need to specify either a domain name or URL.

    www.test.com

    URL

    Specifies the URL used for forwarding requests. There are three URL matching rules:

    • Exact match: The request URL must exactly match that specified in the forwarding policy.
    • Prefix match: The requested URL starts with the specified URL string.
    • Regular expression match: The URLs are matched using a regular expression.

    /login.php

    Action

    Forward to a backend server group

    If the request matches the configured forwarding rule, the request is forwarded to the specified backend server group.

    -

    Redirect to another listener

    If the request matches the configured forwarding rule, the request is redirected to the specified HTTPS listener.

    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.

    -

  7. Click Save.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback