Soru

Zorluk: KolayHigh-Performing Content Delivery and Caching Solutions

A company hosts a collection of static PDF user guides on an Amazon S3 bucket and distributes them globally using an Amazon CloudFront distribution. The company notices that despite using a Content Delivery Network (CDN), the S3 bucket is experiencing high request volumes, leading to unexpected data transfer costs. An engineer checks the CloudFront configuration and finds that edge locations are always requesting the PDF guides directly from the S3 bucket.

Which configuration issue is causing this behavior?

  1. A
    The PDF files are stored in the Amazon S3 Standard-Infrequent Access (S3 Standard-IA) storage class, which introduces retrieval delays that prevent CloudFront caching.
  2. B
    The S3 bucket is accessed through a NAT Gateway for high-volume data transfer, which blocks CloudFront from caching edge files.
  3. The CloudFront distribution's cache behavior has its minimum, maximum, and default Time to Live (TTL) values configured to 00.Cevap
  4. D
    The underlying database is configured with provisioned capacity mode instead of on-demand capacity mode, causing the queries to time out.

Cevap

The CloudFront distribution's cache behavior has its minimum, maximum, and default Time to Live (TTL) values configured to 00.
Setting the Time to Live (TTL) values (Minimum TTL, Maximum TTL, and Default TTL) to 00 in the CloudFront cache behavior disables caching. CloudFront will forward every request directly to the origin S3 bucket, resulting in high S3 request volumes and increased data transfer fees.

Adım Adım Çözüm

1
Analyze the problem where CloudFront is not caching static files and is sending all requests directly to the Amazon S3 origin.
Identify that the cache hit ratio is 0%0\% and origin requests equal total requests.
This indicates that CloudFront is bypassing the cache entirely for every request.
2
Review the cache settings of the CloudFront distribution's cache behavior.
Find that the TTL (Time to Live) values (minimum, maximum, and default TTL) are all set to 00.
A TTL of 00 explicitly instructs CloudFront to not cache the files at edge locations.

Anahtar Kavram

CloudFront TTL configuration for static content delivery
Bu soruyu puanla