API Gateway throttling is a way to limit the number of requests a client can make to an API in a given time. It helps protect the backend from too much traffic and keeps the system stable.
Click to reveal answer
beginner
What are the two main throttling limits in AWS API Gateway?
The two main limits are the rate limit (requests per second) and the burst limit (maximum number of requests allowed in a short time).
Click to reveal answer
intermediate
How does burst capacity help in API Gateway throttling?
Burst capacity allows short spikes of traffic above the steady rate limit. It acts like a temporary buffer to handle sudden bursts without rejecting requests immediately.
Click to reveal answer
beginner
What happens when a client exceeds the throttling limits in API Gateway?
The API Gateway returns a 429 Too Many Requests error to the client, indicating the request was rejected due to throttling.
Click to reveal answer
intermediate
How can you customize throttling settings per API key in AWS API Gateway?
You can create usage plans that specify throttling limits and associate them with API keys. This allows different clients to have different rate and burst limits.
Click to reveal answer
What does the burst limit in API Gateway throttling control?
ANumber of concurrent connections
BTotal requests per day
CMaximum requests allowed in a short time
DSize of the request payload
✗ Incorrect
The burst limit controls how many requests can be handled in a short burst above the steady rate limit.
What HTTP status code does API Gateway return when throttling limits are exceeded?
A429 Too Many Requests
B500 Internal Server Error
C403 Forbidden
D404 Not Found
✗ Incorrect
API Gateway returns 429 to indicate the client sent too many requests in a given time.
Which AWS feature allows setting different throttling limits for different clients?
AIAM Roles
BUsage Plans with API Keys
CLambda Functions
DCloudWatch Alarms
✗ Incorrect
Usage plans let you define throttling and quota limits and associate them with API keys for different clients.
Why is throttling important in API Gateway?
ATo encrypt API requests
BTo increase API response size
CTo speed up database queries
DTo protect backend from overload
✗ Incorrect
Throttling protects backend services by limiting request rates and preventing overload.
If your API experiences sudden traffic spikes, which throttling setting helps handle them temporarily?
ABurst limit
BTimeout setting
CRate limit
DCache size
✗ Incorrect
Burst limit allows short bursts of traffic above the steady rate limit to handle spikes.
Explain how API Gateway throttling works and why it is important for system stability.
Think about how limiting requests helps keep the system healthy.
You got /5 concepts.
Describe how you can customize throttling for different clients using AWS API Gateway features.
Consider how different users might have different access needs.
You got /4 concepts.
Practice
(1/5)
1. What is the primary purpose of API Gateway throttling in AWS?
easy
A. To store API request logs permanently
B. To limit the number of requests to protect backend services from overload
C. To increase the speed of API responses
D. To encrypt API requests automatically
Solution
Step 1: Understand API Gateway throttling purpose
API Gateway throttling is designed to control the rate of incoming requests to prevent backend overload.
Step 2: Evaluate options against throttling purpose
Only To limit the number of requests to protect backend services from overload correctly describes throttling as limiting requests to protect backend services.
Final Answer:
To limit the number of requests to protect backend services from overload -> Option B
Quick Check:
Throttling = Limit requests [OK]
Hint: Throttling means limiting requests to avoid overload [OK]
Common Mistakes:
Confusing throttling with encryption
Thinking throttling speeds up responses
Assuming throttling stores logs
2. Which of the following correctly represents the syntax to set a rate limit of 100 requests per second in AWS API Gateway throttling settings?
easy
A. throttle(100, 200)
B. rate_limit = 100, burst_limit = 200
C. rateLimit: 100, burstLimit: 200
D. setRate(100), setBurst(200)
Solution
Step 1: Identify correct AWS API Gateway throttling syntax
The correct syntax uses camelCase keys like rateLimit and burstLimit with numeric values.
Step 2: Compare options to AWS documentation style
rateLimit: 100, burstLimit: 200 matches the correct syntax format; others use invalid or pseudo-code styles.
Final Answer:
rateLimit: 100, burstLimit: 200 -> Option C
Quick Check:
Correct syntax uses camelCase keys [OK]
Hint: AWS uses camelCase keys like rateLimit, burstLimit [OK]
Common Mistakes:
Using underscores instead of camelCase
Using function calls instead of key-value pairs
Confusing method names with settings
3. Given the following API Gateway throttling settings: rateLimit: 50 and burstLimit: 100, what happens when 120 requests arrive simultaneously?
medium
A. Up to 100 requests are processed immediately; the rest are throttled
B. Only 50 requests are processed; the rest are throttled
C. All 120 requests are processed immediately
D. Requests are queued and processed one by one without throttling
Solution
Step 1: Understand burstLimit and rateLimit roles
BurstLimit allows short spikes up to 100 requests at once; rateLimit controls steady rate at 50 requests per second.
Step 2: Analyze 120 simultaneous requests
Up to 100 requests are allowed immediately (burst), the remaining 20 exceed burst and get throttled.
Final Answer:
Up to 100 requests are processed immediately; the rest are throttled -> Option A
Quick Check:
BurstLimit = immediate spike limit [OK]
Hint: BurstLimit allows short spikes, rateLimit steady rate [OK]
Common Mistakes:
Confusing rateLimit with burstLimit
Assuming all requests pass immediately
Thinking requests queue without throttling
4. You configured API Gateway throttling with rateLimit: 200 and burstLimit: 300. However, clients report receiving HTTP 429 errors even when sending 150 requests per second. What is the most likely cause?
medium
A. The usage plan or API key limits are lower than throttling settings
B. The API Gateway cache is full, causing throttling
C. The backend service is down, causing 429 errors
D. The rateLimit and burstLimit values are too high
Solution
Step 1: Understand causes of HTTP 429 in API Gateway
429 errors mean throttling triggered due to exceeding limits.
Step 2: Check usage plan and API key limits
Usage plans or API keys can have lower throttling limits overriding global settings, causing 429 errors at lower rates.
Final Answer:
The usage plan or API key limits are lower than throttling settings -> Option A
Quick Check:
Usage plan limits override throttling [OK]
Hint: Check usage plan limits if throttling occurs unexpectedly [OK]
Common Mistakes:
Blaming backend service for 429 errors
Assuming cache affects throttling
Thinking high limits cause throttling
5. You design an API for a popular mobile app expecting sudden traffic spikes up to 1000 requests per second for short bursts, but steady traffic around 300 requests per second. How should you configure API Gateway throttling to handle this efficiently?
hard
A. Set rateLimit to 1000 and burstLimit to 300
B. Set both rateLimit and burstLimit to 1000
C. Set both rateLimit and burstLimit to 300
D. Set rateLimit to 300 and burstLimit to 1000
Solution
Step 1: Match throttling settings to traffic patterns