A digital publishing company hosts a web application where users download magazine issues and static images. The files are stored in an Amazon S3 bucket. To reduce download latency and S3 data transfer costs, the company deployed an Amazon CloudFront distribution in front of the S3 bucket. However, during a peak traffic event, the backend database and S3 bucket experienced high loads, and reports showed a CloudFront cache hit ratio of 0% for the static assets.
Which configuration issue explains why the static assets are not being cached at the edge locations?
- The cache policy associated with the CloudFront cache behavior for static assets has its Minimum TTL, Maximum TTL, and Default TTL values set to 0 seconds.Cevap
- BThe S3 bucket hosting the static assets is configured to transition objects to S3 Standard-Infrequent Access (S3 Standard-IA) immediately upon creation, which restricts caching.
- CAmazon Route 53 is configured with a latency routing policy that redirects user requests directly to the regional S3 bucket endpoints, bypassing the CloudFront caching layer.
- DThe application database is configured to store static asset download logs in Amazon DynamoDB using partition keys structured as monotonically increasing timestamps.
Cevap
The cache policy associated with the CloudFront cache behavior for static assets has its Minimum TTL, Maximum TTL, and Default TTL values set to 0 seconds.
Specifying a TTL of 0 seconds on a CloudFront cache behavior tells CloudFront not to cache the objects retrieved from the origin. This results in a cache hit ratio of 0% and sends all requests directly to the origin S3 bucket, causing increased latency and higher data transfer costs.
Adım Adım Çözüm
Anahtar Kavram
CloudFront cache policy TTL settings
Tahmini Süre:1m 30s