A global weather application serves forecast data that is updated once every 15 minutes. The backend architecture consists of Amazon Route 53, Amazon API Gateway, AWS Lambda, and Amazon DynamoDB. The application experiences a high volume of read requests. The development team wants to optimize read performance, reduce the compute load on AWS Lambda, and keep integration changes minimal. Which of the following solutions should a solutions architect recommend?
- Enable caching on the API Gateway stage with a Time-to-Live (TTL) of 900 seconds.Cevap
- BDeploy Amazon CloudFront in front of the API Gateway, and configure a cache behavior with a Minimum, Maximum, and Default TTL of 0 seconds.
- CConfigure the Amazon DynamoDB table in Provisioned Capacity mode and scale up the Read Capacity Units (RCUs) to handle the peak request rate.
- DConfigure Amazon Route 53 Latency routing to distribute requests across multiple regional API Gateway endpoints.
Cevap
Enable caching on the API Gateway stage with a Time-to-Live (TTL) of 900 seconds.
Enabling caching on the API Gateway stage with a Time-to-Live (TTL) of 900 seconds allows API Gateway to respond to client requests using cached data. Because the weather forecast data changes only every 15 minutes, a 900-second cache duration aligns perfectly with the update cycle. This solution prevents duplicate requests from triggering AWS Lambda, thereby reducing compute load and database queries while lowering overall latency.
Adım Adım Çözüm
Anahtar Kavram
API Gateway Caching
Tahmini Süre:1m 30s