Q12. Amazon CloudFront로 정적 및 동적 콘텐츠 성능 최적화하기
AWS 자격증을 준비하는 여러분, 안녕하세요. 오늘은 글로벌 웹 애플리케이션의 성능을 개선하는 방법에 대해 알아보겠습니다. 특히 Amazon CloudFront를 활용하여 정적 및 동적 콘텐츠의 전송 속도를 높이는 방법을 살펴보겠습니다.
문제 상황
Q12:
글로벌 회사는 ALB(Application Load Balancer) 뒤의 Amazon EC2 인스턴스에서 웹 애플리케이션을 호스팅합니다. 웹 애플리케이션에는 정적 데이터와 동적 데이터가 있습니다. 회사는 정적 데이터를 Amazon S3 버킷에 저장합니다. 회사는 정적 데이터 및 동적 데이터의 성능을 개선하고 대기 시간을 줄이기를 원합니다. 회사는 Amazon Route 53에 등록된 자체 도메인 이름을 사용하고 있습니다.
솔루션 설계자는 이러한 요구 사항을 충족하기 위해 무엇을 해야 합니까?
<small>A global company hosts a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The web application has both static and dynamic data. The company stores the static data in an Amazon S3 bucket. The company wants to improve the performance of both the static data and the dynamic data and reduce latency. The company uses its own domain name that is registered with Amazon Route 53.
What should a solutions architect do to meet these requirements?</small>
선택지
A. S3 버킷과 ALB를 오리진으로 포함하는 Amazon CloudFront 배포를 생성합니다. CloudFront 배포로 트래픽을 라우팅하도록 Route 53을 구성합니다.
<small>Create an Amazon CloudFront distribution that includes the S3 bucket and the ALB as origins. Configure Route 53 to route traffic to the CloudFront distribution.</small>
B. ALB가 오리진인 Amazon CloudFront 배포를 생성합니다. S3 버킷을 엔드포인트로 포함하는 AWS Global Accelerator 표준 액셀러레이터를 생성합니다. CloudFront 배포로 트래픽을 라우팅하도록 Route 53을 구성합니다.
<small>Create an Amazon CloudFront distribution that has the ALB as an origin. Create an AWS Global Accelerator standard accelerator that includes the S3 bucket as an endpoint. Configure Route 53 to route traffic to the CloudFront distribution.</small>
C. S3 버킷을 오리진으로 포함하는 Amazon CloudFront 배포를 생성합니다. ALB 및 CloudFront 배포를 엔드포인트로 포함하는 AWS Global Accelerator 표준 액셀러레이터를 생성합니다. 가속기 DNS 이름을 가리키는 사용자 지정 도메인 이름을 만듭니다. 사용자 지정 도메인 이름을 웹 애플리케이션의 끝점으로 사용합니다.
<small>Create an Amazon CloudFront distribution that includes the S3 bucket as an origin. Create an AWS Global Accelerator standard accelerator that includes the ALB and the CloudFront distribution as endpoints. Create a custom domain name that points to the accelerator DNS name. Use the custom domain name as the endpoint for the web application.</small>
D. ALB가 오리진인 Amazon CloudFront 배포를 생성합니다. S3 버킷을 엔드포인트로 포함하는 AWS Global Accelerator 표준 액셀러레이터를 생성합니다. 두 개의 도메인 이름을 만듭니다. 하나의 도메인 이름이 동적 콘텐츠의 CloudFront DNS 이름을 가리키도록 합니다. 다른 도메인 이름이 정적 콘텐츠에 대한 가속기 DNS 이름을 가리키도록 합니다. 도메인 이름을 웹 애플리케이션의 끝점으로 사용합니다.
<small>Create an Amazon CloudFront distribution that has the ALB as an origin. Create an AWS Global Accelerator standard accelerator that includes the S3 bucket as an endpoint. Create two domain names. Have one domain name point to the CloudFront DNS name for dynamic content. Have the other domain name point to the accelerator DNS name for static content. Use the domain names as endpoints for the web application.</small>
정답 및 해설
정답은 A입니다.
Amazon CloudFront는 정적 및 동적 콘텐츠 모두에 대해 최적의 성능을 제공할 수 있습니다. CloudFront 배포를 생성할 때 여러 오리진을 지정할 수 있으며, 이 경우 S3 버킷(정적 콘텐츠용)과 ALB(동적 콘텐츠용)를 모두 오리진으로 설정할 수 있습니다.
-
CloudFront 배포 생성: S3 버킷과 ALB를 오리진으로 설정합니다. 이렇게 하면 정적 콘텐츠는 S3에서, 동적 콘텐츠는 ALB를 통해 EC2 인스턴스에서 제공됩니다.
-
Route 53 구성: CloudFront 배포로 트래픽을 라우팅하도록 Route 53을 설정합니다. 이는 사용자 지정 도메인을 CloudFront와 연결하는 데 필요합니다.
이 방식의 장점:
- 정적 콘텐츠는 CloudFront 엣지 로케이션에서 캐싱되어 빠르게 제공됩니다.
- 동적 콘텐츠도 CloudFront를 통해 전달되므로, TCP 연결 최적화 등의 이점을 얻을 수 있습니다.
- 단일 도메인으로 모든 콘텐츠를 제공할 수 있어 관리가 용이합니다.
오답 설명
B. AWS Global Accelerator는 TCP/UDP 트래픽에 적합하며, 이 경우 불필요합니다. 또한 S3를 직접 엔드포인트로 사용할 수 없습니다.
C. S3만 CloudFront 오리진으로 사용하면 동적 콘텐츠 처리가 어렵습니다. Global Accelerator 사용은 이 상황에 과도한 솔루션입니다.
D. 두 개의 별도 도메인을 사용하는 것은 복잡성을 증가시키며, Global Accelerator 사용은 여기서 불필요합니다.
결론
이 문제는 CloudFront의 다양한 기능을 이해하고 있는지 테스트합니다. CloudFront는 정적 및 동적 콘텐츠 모두에 대해 성능을 최적화할 수 있으며, 여러 오리진을 사용하여 다양한 유형의 콘텐츠를 효율적으로 제공할 수 있습니다. 글로벌 웹 애플리케이션의 성능 최적화 시 CloudFront의 이러한 특성을 활용하는 것이 중요합니다.
댓글
댓글 쓰기