aws sap 문제 풀이 9주차 문제풀이 4번

aws, sap, April 30, 2023

질문 4: 건너뜀

A company runs a popular blogging platform that is hosted on AWS. Bloggers from all around the world upload millions of entries per month, and the average blog entry size is 300 KB. The access rate to blog entries drops to a negligible level six months after publishing and after a year, bloggers rarely access a blog. The blog entries have a high update rate during the first 3 months after the blogger has published it and this drops to no updates after 6 months. The company wants to use CloudFront to improve the load times of the blogging platform.

Which of the following is an ideal cloud implementation for this scenario?

Store two copies of each entry in two different S3 buckets, and let each bucket have its own CloudFront distribution where S3 access is permitted to that CloudFront identity only.

Create a CloudFront distribution and set the Restrict Viewer Access Forward Query string to true with a minimum TTL of 0.

You can use one S3 source bucket that is partitioned according to the month a blog entry was submitted, and store the entry in that partition. Create a CloudFront distribution with access permissions to S3 and is restricted only to it.

Create two different CloudFront distributions: one with US-Europe price class for your US/Europe users and another one with all edge locations included for your remaining users.

풀이 및 공부

답은 3번. Cloudfront 를 써서 로드시간을 개선하는건 알겠는데, 문제에서 나온 read는 6개월, 1년 단위로, update는 3개월, 6개월 단위 이런말이 나오는데 partitioned according to the month를 하면 어떤 효과가 있는지 궁금했다.

찾아보니 s3에서 partition(object path) 별 cache-control 설정이 가능하고 그러면 cloudfront에서 월 별로 다른 cache ttl을 가지게 할 수 있다. (s3의 “cache-control은 cloudfront에게 000초 만큼 캐시해줘” 이런식으로 쓰인다.)

cloudfront에서의 설정은 아래 링크를 참고하자.

참고

https://parkadd.tistory.com/116

Comments