Amazon API Gateway | Throttling and Caching Flashcards

1
Q

How quickly are logs available?

Throttling and Caching

Amazon API Gateway | Networking & Content Delivery

A

Logs, alarms, error rates and other metrics are stored in Amazon CloudWatch and are available near real time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can I protect my backend systems and applications from traffic spikes?

Throttling and Caching

Amazon API Gateway | Networking & Content Delivery

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Can I throttle individual developers calling my APIs?

Throttling and Caching

Amazon API Gateway | Networking & Content Delivery

A

Yes. With usage plans you can set throttling limits for individual API keys.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does throttling help me?

Throttling and Caching

Amazon API Gateway | Networking & Content Delivery

A

Throttling ensures that API traffic is controlled to help your backend services maintain performance and availability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

At which levels can Amazon API Gateway throttle inbound API traffic?

Throttling and Caching

Amazon API Gateway | Networking & Content Delivery

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are throttling rules applied?

Throttling and Caching

Amazon API Gateway | Networking & Content Delivery

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Does Amazon API Gateway provide API result caching?

Throttling and Caching

Amazon API Gateway | Networking & Content Delivery

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What happens if a large number of end users try to invoke my API simultaneously?

Throttling and Caching

Amazon API Gateway | Networking & Content Delivery

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly