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
Situation Awareness
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

Request Throttling

Updated on 2024-08-07 GMT+08:00

Request throttling limits the number of times APIs can be called by a user or app within a specific time period to protect backend services. The throttling can be down to the minute or second. To ensure service continuity of an API, create a request throttling policy for the API.

Usage Guidelines

  • You have understood the guidelines for policy creation and API binding.
  • Adding a request throttling policy to an API means binding them to each other. 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 APIs not bound with a request throttling policy, the throttling limit is the value of ratelimit_api_limits set on the Parameters page of the gateway.

Configuration Parameters

Table 1 Parameter description

Parameter

Description

Name

Request throttling policy name.

Type

API-based or API-shared request throttling.

  • API-specific: Request throttling is based on every API to which the policy is bound.
  • API-sharing: 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. Credential Requests: Limit the maximum number of times an API can be called by a credential 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. Credential Requests

The maximum number of times each bound API can be called by a credential 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 or Max. API 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.

Follow-Up Operations

  • To control the traffic of a credential, bind a request throttling policy to the credential by referring to Binding a Request Throttling Policy to a Credential. Traffic of the credential is limited by the excluded credential threshold, while traffic of APIs and users are still limited by the request throttling policy.
  • To control the traffic of a tenant, bind a request throttling policy to the tenant by referring to Binding a Request Throttling Policy to a Tenant. Traffic of the tenant is limited by the excluded tenant threshold, while traffic of APIs and users are still limited by the request throttling policy.

Binding a Request Throttling Policy to a Credential

You have created a credential or obtained a credential ID from other tenants.

  1. On the request throttling policy details page, click the Excluded Credentials tab.
  2. Click Select Excluded Credential.
  3. Select a credential to exclude. You can use one of the following methods:

    • To select an existing credential, click Existing, select a credential, and enter a threshold.
    • To select a credential of other tenants, click Cross-tenant, and enter the credential ID and a threshold.
    NOTE:

    Excluded credential thresholds take precedence over the value of Max. Credential Requests.

    For example, a request throttling policy has been configured, with Max. API Requests being 10, Max. Credential Requests being 3, Period being 1 minute, and two excluded credentials (max. 2 API requests for credential A and max. 4 API requests for credential B). If the request throttling policy is bound to an API, credential A and B can access the API 2 and 4 times within 1 minute, respectively.

Binding a Request Throttling Policy to a Tenant

  1. On the request throttling policy details page, click the Excluded Tenants tab.
  1. Click Select Excluded Tenant.
  2. Enter the tenant information.

    Table 2 Excluded tenant configuration

    Parameter

    Description

    Tenant ID

    Account ID or project ID. For details, see the description about Excluded Tenants in Table 1.

    Threshold

    The maximum number of times an API can be called by the tenant within a specified period.

    The value of this parameter cannot exceed that of Max. API Requests.

  3. Click OK.

    NOTE:

    Excluded tenant thresholds take precedence over the value of Max. User Requests.

    For example, a request throttling policy has been configured, with Max. API Requests being 10, Max. User Requests being 3, Period being 1 minute, and two excluded tenants (max. 2 API requests for tenant A and max. 4 API requests for tenant B). If the request throttling policy is bound to an API, tenants A and B can access the API 2 and 4 times within 1 minute, respectively.

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