aws sap 문제 풀이 3주차 문제풀이 2번

aws, sap, March 12, 2023

문제

질문 27 A company currently hosts its online immigration system on one large Amazon EC2 instance with attached EBS volumes to store all of the applicants’ data. The registration system accepts the information from the user including documents and photos and then performs automated verification and processing to check if the applicant is eligible for immigration. The immigration system becomes unavailable at times when there is a surge of applicants using the system. The existing architecture needs improvement as it takes a long time for the system to complete the processing and the attached EBS volumes are not enough to store the ever-growing data being uploaded by the users. Which of the following options is the recommended option to achieve high availability and more scalable data storage? 회사는 one large Amazon EC2 인스턴스에서 온라인 이민 시스템을 호스팅하고 있고, 현재 지원자의 모든 데이터를 저장하기 위해 EBS 볼륨이 attach 되어 있습니다. 등록 시스템은 사용자로부터 문서, 사진 등의 정보를 받아 자동 검증 및 처리를 수행하여 신청자가 이민 자격이 있는지 확인합니다. 시스템을 사용하는 지원자가 급증할 때 이민 시스템을 사용할 수 없게 됩니다. 기존 아키텍처는 시스템이 처리를 완료하는 데 오랜 시간이 걸리고 연결된 EBS 볼륨이 (사용자가 업로드하는) 계속 증가하는 데이터를 저장하기에 충분하지 않기 때문에 개선이 필요합니다. 다음 중 고가용성 및 확장 가능한(scalable) 데이터 스토리지를 달성하기 위해 권장되는 옵션은 무엇입니까?

  1. Upgrade to EBS with Provisioned IOPS as your main storage service and change your architecture to use an SQS queue to distribute the tasks to a group of EC2 instances. Use Auto Scaling to dynamically increase or decrease the group of EC2 instances depending on the length of the SQS queue.

  2. Upgrade your architecture to use an S3 bucket with cross-region replication (CRR) enabled, as the storage service. Set up an SQS queue to distribute the tasks to a group of EC2 instances with Auto Scaling to dynamically increase or decrease the group of EC2 instances depending on the length of the SQS queue. Use CloudFormation to replicate your architecture to another region.

  3. Use EBS with Provisioned IOPS to store files, SNS to distribute tasks to a group of EC2 instances working in parallel, and Auto Scaling to dynamically size the group of EC2 instances depending on the number of SNS notifications. Use CloudFormation to replicate your architecture to another region.

  4. Use SNS to distribute the tasks to a group of EC2 instances. Use Auto Scaling to dynamically increase or decrease the group of EC2 instances depending on the length of the SQS queue.

답 : 2번

풀이 및 공부

B번

cross-region replication 설정하는 방법


sqs - autoscaling 설정하는 방법

CloudWatch는 AWS Service 와 통합이 쉽다.

위 이미지처럼 ApproximateNumberOfMessagesVisible 값이 500이 넘으면 Alarm을 보낼 수 있다.

Auto-scaling 에서 scaling policy를 정할 때 Cloudwatch Alarm 을 선택할 수 있다.

참고

  • https://www.wellarchitectedlabs.com/reliability/disaster-recovery/workshop_1/2-s3-crr/

  • https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-using-sqs-queue.html

Comments