Amazon API Gateway | Throttling and Caching Flashcards
How quickly are logs available?
Throttling and Caching
Amazon API Gateway | Networking & Content Delivery
Logs, alarms, error rates and other metrics are stored in Amazon CloudWatch and are available near real time.
How can I protect my backend systems and applications from traffic spikes?
Throttling and Caching
Amazon API Gateway | Networking & Content Delivery
Amazon API Gateway provides throttling at multiple levels including global and by service call. Throttling limits can be set for standard rates and bursts. For example, API owners can set a rate limit of 1,000 requests per second for a specific method in their REST APIs, and also configure Amazon API Gateway to handle a burst of 2,000 requests per second for a few seconds. Amazon API Gateway tracks the number of requests per second. Any requests over the limit will receive a 429 HTTP response. The client SDKs generated by Amazon API Gateway retry calls automatically when met with this response.
Can I throttle individual developers calling my APIs?
Throttling and Caching
Amazon API Gateway | Networking & Content Delivery
Yes. With usage plans you can set throttling limits for individual API keys.
How does throttling help me?
Throttling and Caching
Amazon API Gateway | Networking & Content Delivery
Throttling ensures that API traffic is controlled to help your backend services maintain performance and availability.
At which levels can Amazon API Gateway throttle inbound API traffic?
Throttling and Caching
Amazon API Gateway | Networking & Content Delivery
Throttling rate limits can be set at the method level. You can edit the throttling limits in your method settings through the Amazon API Gateway APIs or in the Amazon API Gateway console.
How are throttling rules applied?
Throttling and Caching
Amazon API Gateway | Networking & Content Delivery
First. API Gateway checks against your AWS account limit. If the traffic is below the set account limit, API Gateway checks the limit you have set on a stage or method. If the traffic is below the stage limit, then API Gateway applies the usage plans limits you set on a per-API key basis.
Does Amazon API Gateway provide API result caching?
Throttling and Caching
Amazon API Gateway | Networking & Content Delivery
Yes. You can add caching to API calls by provisioning an Amazon API Gateway cache and specifying its size in gigabytes. The cache is provisioned for a specific stage of your APIs. This improves performance and reduces the traffic sent to your back end. Cache settings allow you to control the way the cache key is built and the time-to-live (TTL) of the data stored for each method. Amazon API Gateway also exposes management APIs that help you invalidate the cache for each stage.
What happens if a large number of end users try to invoke my API simultaneously?
Throttling and Caching
Amazon API Gateway | Networking & Content Delivery
If caching is not enabled and throttling limits have not been applied, then all requests will pass through to your backend service until the account level throttling limits are reached. If throttling limits are in place, then Amazon API Gateway will shed the necessary amount of requests and send only the defined limit to your back-end service. If a cache is configured, then Amazon API Gateway will return a cached response for duplicate requests for a customizable time, but only if under configured throttling limits. This balance between the backend and client ensures optimal performance of the APIs for the applications that it supports. Requests that are throttled will be automatically retried by the client-side SDKs generated by Amazon API Gateway. By default, Amazon API Gateway does not set any cache on your API methods.