A company hosts a recipe sharing portal on Amazon EC2 instances behind an Application Load Balancer (ALB). The portal serves static image files of recipes, which are currently stored on the EC2 instances' attached Amazon EBS volumes. The recipe images are updated daily by users. During peak traffic hours, the EC2 instances experience extreme CPU utilization and high network bandwidth consumption from serving these static images. A solutions architect needs to design a high-performing and cost-effective solution to offload the static image serving and improve response times.
Which solution should the solutions architect recommend?
- ACreate an Amazon CloudFront distribution with the Application Load Balancer as the origin, and configure the cache behavior for the images with the default, minimum, and maximum Time to Live (TTL) set to 0.
- BMigrate the static images to an Amazon S3 Glacier Flexible Retrieval bucket, and configure the application to serve the images directly from S3 Glacier to minimize storage costs.
- Migrate the static images to an Amazon S3 Standard bucket, and create an Amazon CloudFront distribution with the S3 bucket as the origin to serve the images.Cevap
- DMigrate the static images to an Amazon S3 Standard-Infrequent Access (S3 Standard-IA) bucket to reduce storage costs, and configure the application to serve the images directly from the S3 bucket.
Cevap
Migrate the static images to an Amazon S3 Standard bucket, and create an Amazon CloudFront distribution with the S3 bucket as the origin to serve the images.
Migrating the static images to an Amazon S3 Standard bucket and serving them through Amazon CloudFront offloads all static asset requests from the Application Load Balancer and EC2 instances. CloudFront caches the images at edge locations close to users, reducing latency and lowering the compute and bandwidth load on the origin servers.
Adım Adım Çözüm
Anahtar Kavram
Static content offloading and edge caching using Amazon S3 and Amazon CloudFront