Rate Limiting
Rate Limiting
📖 定义
Rate Limiting is a technique for controlling API request rates by limiting the number of requests per unit time, protecting backend services from overload and ensuring system stability and fair resource allocation. Common algorithms include token bucket, leaky bucket, sliding window, etc.
🔗 在 Higress 中的应用
Higress provides multi-dimensional rate limiting capabilities, supporting fine-grained rate limiting strategies based on routes, headers, and parameters, and also supports token-level rate limiting in AI scenarios.
💡 示例
- 1 Each API Key allows a maximum of 100 requests per minute
- 2 Limit call frequency by user ID to prevent abuse
- 3 AI interfaces perform quota control based on token consumption
⚙️ 配置示例
YAML
# Higress Rate Limiting Configuration Example
plugins:
- name: request-rate-limiter
config:
rate: 100
burst: 200
key: consumer 🔄 相关术语
❓ 常见问题
Rate Limiting 是什么?
Rate Limiting is a technique for controlling API request rates by limiting the number of requests per unit time, protecting backend services from overload and ensuring system stability and fair resource allocation. Common algorithms include token bucket, leaky bucket, sliding window, etc.
Higress 如何支持 Rate Limiting?
Higress provides multi-dimensional rate limiting capabilities, supporting fine-grained rate limiting strategies based on routes, headers, and parameters, and also supports token-level rate limiting in AI scenarios.
深入了解 Higress
探索更多 Higress 的功能和最佳实践