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

Creating a Request Throttling Policy

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

Scenario

Request throttling controls the number of times an API can be called within a time period to protect backend services.

To provide stable, uninterrupted services, you can create request throttling policies to control the number of calls made to your APIs.

Request throttling policies take effect for an API only if they have been bound to the API.

NOTE:
  • An API can be bound with only one request throttling policy for a given environment, but each request throttling policy can be bound to multiple APIs.
  • For the shared gateway, the default request throttling limit is 200 calls per second.

Prerequisites

You have published the API to which you want to bind a request throttling policy.

Creating a Request Throttling Policy

  1. Access the shared gateway console.
  2. In the navigation pane, choose API Publishing > Request Throttling.
  3. Click Create Request Throttling Policy, and set the parameters listed in Table 1.

    Table 1 Parameters for creating a request throttling policy

    Parameter

    Description

    Name

    Request throttling policy name.

    Type

    API-based or API-shared request throttling.

    • API-based: Request throttling is based on every API to which the policy is bound.
    • API-shared: Request throttling is based on all APIs as a whole to which the policy is bound.

    Period

    For how long you want to limit the number of API calls. This parameter can be used together with the following parameters:

    • Max. API Requests: Limit the maximum number of times an API can be called within a specific period.
    • Max. User Requests: Limit the maximum number of times an API can be called by a user within a specific period.
    • Max. App Requests: Limit the maximum number of times an API can be called by an app within a specific period.
    • Max. IP Address Requests: Limit the maximum number of times an API can be called by an IP address within a specific period.

    Max. API Requests

    The maximum number of times each bound API can be called within the specified period.

    This parameter must be used together with Period.

    Max. User Requests

    The maximum number of times each bound API can be called by a user within the specified period. This limit only applies to APIs that are accessed through app or IAM authentication.

    • The value of this parameter cannot exceed that of Max. API Requests.
    • This parameter must be used together with Period.
    • If there are many users under your account that access an API, the request throttling limits of the API will apply to all these users.

    Max. App Requests

    The maximum number of times each bound API can be called by an app within the specified period. This limit only applies to APIs that are accessed through app authentication.

    • The value of this parameter cannot exceed that of Max. User Requests.
    • This parameter must be used together with Period.

    Max. IP Address Requests

    The maximum number of times each bound API can be called by an IP address within the specified period.

    • The value of this parameter cannot exceed that of Max. API Requests.
    • This parameter must be used together with Period.

    Description

    Description of the request throttling policy.

  4. Click OK.

    After the policy is created, it is displayed on the Request Throttling page. You can bind this policy to APIs to throttle API requests.

Binding a Request Throttling Policy to an API

  1. Go to the page for binding a request throttling policy to an API. You can use one of the following methods:

    • In the Operation column of the request throttling policy to be bound, click Bind to API, and then click Select API.
    • Click the name of the target request throttling policy, and click Select API on the APIs tab page.

  2. Specify an API group, environment, and API name keyword to search for the desired API.
  3. Select the API and click OK.

    Figure 1 Binding a request throttling policy to an API
    NOTE:

    If a request throttling policy is no longer needed for an API, you can unbind it. To unbind a request throttling policy from multiple APIs, select the APIs, and click Unbind. You can unbind a request throttling policy from a maximum of 1000 APIs at a time.

Follow-Up Operations

To control the maximum number of API calls received from a specific app or tenant, specify the app or tenant to exclude by referring to Adding an Excluded App or Tenant. If an app is excluded in a request throttling policy, any threshold configured for that app takes precedence over the request throttling policy. The API and user request limits of this policy are still valid. If a tenant is excluded in a request throttling policy, any threshold configured for that tenant will be applied. The API and app request limits of this policy are still valid.

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