概念
Throttling strategies
Limit request rates so spikes and bad clients do not overload or overspend a backend.
本课尚未翻译,暂以英文显示。
Where each layer can limit load.
API Gateway usage plan
- Limits
- Rate, burst, quota per key
- Use for
- Paid tiers
WAF rate rule
- Limits
- Requests per IP
- Use for
- Abuse and floods
SQS queue
- Limits
- Smooths bursts
- Use for
- No request lost
Reserved concurrency
- Limits
- Parallel runs
- Use for
- Protect the database
| Tool | Limits | Use for |
|---|---|---|
| API Gateway usage plan | Rate, burst, quota per key | Paid tiers |
| WAF rate rule | Requests per IP | Abuse and floods |
| SQS queue | Smooths bursts | No request lost |
| Reserved concurrency | Parallel runs | Protect the database |
是什么
Throttling protects a backend and caps cost. Put it at the edge of each layer. Amazon API Gateway throttles every API by default, with account-level rate and burst limits, and returns HTTP 429 when a client goes over. Usage plans with API keys give each customer its own rate, burst and daily or monthly quota. That is how you sell service tiers.
是什么
AWS WAF rate-based rules count requests per IP address in a time window and block sources above a limit. That stops abusive clients and simple floods before they reach the API. Amazon SQS in front of workers absorbs bursts. The queue grows, workers read at a steady speed, no request is dropped, and the database sees a flat load. AWS Lambda reserved concurrency caps how many copies of a function run at once, which protects a database from too many connections. DynamoDB with provisioned capacity rejects requests over the limit, so clients must retry.
是什么
Clients should retry throttled calls with exponential backoff and jitter. They wait longer after each failure, with a random delay, so retries do not arrive together. The AWS SDKs do this by default. Pick the tool by two questions. Who is limited: each customer, each IP, or each function? Is dropping a request acceptable (throttle) or not (queue)?
要记住
- API Gateway: default throttling, 429 errors, usage plans and API keys per customer.
- WAF rate-based rule: block IPs that go over a request rate.
- SQS buffers bursts, so workers run at a steady rate.
- Lambda reserved concurrency caps a function and protects downstream databases.
要记住
- DynamoDB over its capacity: requests are throttled. Clients should back off.
- Clients: exponential backoff with jitter.
考试中
- “Different request limits for free and paid customers” points to API Gateway usage plans.
- “Block one IP address that floods the website” points to a WAF rate-based rule.
- “Traffic spikes overload the database and no request may be lost” points to SQS as a buffer.
- “Limit how many Lambda copies hit the database at once” points to reserved concurrency.
别和这些弄混
Amazon API GatewayPick the API type and endpoint type, then add authorizers, throttling, caching and a private path to the backend.
Amazon Simple Queue Service (Amazon SQS)The settings that decide behavior: visibility timeout, long polling, delay, retention, DLQs, and scaling on queue depth.
AWS WAFMatch the web attack to the WAF rule, and know where a web ACL can and cannot attach.
也出现在
本任务内容 · 4.4
- Data transfer cost design
- NAT gateway cost design
- Cost of network connectivity
- CDN and edge caching for cost
- Throttling strategies
Organizations
- Subnets, route tables, gateways and NAT
- VPC endpoints
Load Balancing
Route 53
- Service Quotas
- VPC peering
Transit Gateway
PrivateLink
NLB and GWLB
CloudFront
Global Accelerator
- Hybrid connectivity decision
Direct Connect
Site-to-Site VPN
- Cost allocation tags
Cost Explorer
Budgets
Cost and Usage Reports
- Multi-account billing