A global retail company is deploying a product catalog application. Mobile client devices query a REST API hosted on Amazon API Gateway, which retrieves catalog data from a backend Amazon DynamoDB table. Users frequently query the same popular product categories, resulting in repeated read operations on DynamoDB that threaten to exceed the read capacity during flash sales. Additionally, static product images are stored in an Amazon S3 bucket and suffer from high retrieval latencies in remote regions. Which combination of architectural modifications will provide the lowest latency for users and optimize database performance under peak loads? (Select TWO.)
- Enable Amazon API Gateway caching for the catalog search API stages to cache responses and reduce the read load on the backend Amazon DynamoDB table.Answer
- Deploy an Amazon CloudFront distribution with the Amazon S3 bucket configured as the origin to cache and serve static product images from edge locations closer to users.Answer
- CConfigure the CloudFront distribution's cache behavior for static images with a Minimum TTL, Maximum TTL, and Default TTL of 0 seconds to ensure clients always retrieve the latest image versions from the S3 bucket.
- DProvision a DynamoDB Accelerator (DAX) cluster in a private subnet, and configure the API Gateway integration to route all query traffic to the DAX cluster through a NAT Gateway.
- ESwitch the DynamoDB table to Provisioned Capacity Mode and set the Read Capacity Units (RCUs) to a high static limit to handle the unpredictable search traffic spikes.
Answer
Enable Amazon API Gateway caching for the catalog search API stages, and deploy an Amazon CloudFront distribution with the Amazon S3 bucket configured as the origin.
To optimize the application for performance and cost under peak load, a multi-tiered caching approach is required. Enabling Amazon API Gateway caching at the API stage level reduces read requests to Amazon DynamoDB by returning cached responses for identical queries. Simultaneously, deploying an Amazon CloudFront distribution with the Amazon S3 bucket as the origin caches static product images at edge locations globally, which minimizes retrieval latency for remote users and protects the S3 bucket from request overload.
Step-by-Step Solution
Key Concept
Multi-tier caching configurations to optimize read latency and origin database load.
Estimated Time:3m 0s