Q75. AWS 서버리스 아키텍처로 애플리케이션 성능과 확장성 개선하기
AWS 자격증을 준비하는 여러분, 안녕하세요. 오늘은 온프레미스 환경에서 AWS 클라우드로 애플리케이션을 마이그레이션하면서 성능을 개선하고 현대화하는 방법에 대해 알아보겠습니다. 이 문제를 통해 서버리스 아키텍처의 이점과 AWS의 다양한 관리형 서비스를 활용하는 방법을 이해할 수 있습니다.
문제 상황
Q1:
한 회사에서 애플리케이션의 성능을 개선하기 위해 다계층 애플리케이션을 온프레미스에서 AWS 클라우드로 이동하려고 합니다. 애플리케이션은 RESTful 서비스를 통해 서로 통신하는 애플리케이션 계층으로 구성됩니다. 한 계층이 오버로드되면 트랜잭션이 삭제됩니다. 솔루션 설계자는 이러한 문제를 해결하고 애플리케이션을 현대화하는 솔루션을 설계해야 합니다.
어떤 솔루션이 이러한 요구 사항을 충족하고 운영상 가장 효율적입니까?
<small>A company wants to move a multi-tiered application from on-premises to the AWS Cloud to improve the application's performance. The application consists of application tiers that communicate with each other through RESTful services. When one tier becomes overloaded, transactions are dropped. A solutions architect needs to design a solution that addresses these issues and modernizes the application.
Which solution will meet these requirements and be the MOST operationally efficient?</small>
선택지
A. Amazon API Gateway를 사용하고 애플리케이션 계층으로 AWS Lambda 함수에 트랜잭션을 전달합니다. Amazon Simple Queue Service(Amazon SQS)를 애플리케이션 서비스 간의 통신 계층으로 사용합니다.
<small>Use Amazon API Gateway and pass transactions to AWS Lambda functions as the application tiers. Use Amazon Simple Queue Service (Amazon SQS) as the communication layer between application services.</small>
B. Amazon CloudWatch 지표를 사용하여 애플리케이션 성능 기록을 분석하여 성능 장애 동안 서버의 최대 사용률을 결정합니다. 최대 요구 사항을 충족하도록 애플리케이션 서버의 Amazon EC2 인스턴스 크기를 늘립니다.
<small>Use Amazon CloudWatch metrics to analyze the application performance history to determine the maximum utilization of servers during performance degradation. Increase the Amazon EC2 instance size of the application servers to meet the maximum requirements.</small>
C. Amazon Simple Notification Service(Amazon SNS)를 사용하여 Auto Scaling 그룹의 Amazon EC2에서 실행되는 애플리케이션 서버 간의 메시징을 처리합니다. Amazon CloudWatch를 사용하여 SNS 대기열 길이를 모니터링하고 필요에 따라 확장 및 축소합니다.
<small>Use Amazon Simple Notification Service (Amazon SNS) to handle messaging between application servers running on Amazon EC2 in an Auto Scaling group. Use Amazon CloudWatch to monitor the SNS queue length and scale out and in as needed.</small>
D. Amazon Simple Queue Service(Amazon SQS)를 사용하여 Auto Scaling 그룹의 Amazon EC2에서 실행되는 애플리케이션 서버 간의 메시징을 처리합니다. Amazon CloudWatch를 사용하여 SQS 대기열 길이를 모니터링하고 통신 오류가 감지되면 확장합니다.
<small>Use Amazon Simple Queue Service (Amazon SQS) to handle messaging between application servers running on Amazon EC2 in an Auto Scaling group. Use Amazon CloudWatch to monitor the SQS queue length and scale out when communication errors are detected.</small>
정답 및 해설
정답은 A입니다.
<small>The correct answer is A.</small>
Amazon API Gateway, AWS Lambda, 그리고 Amazon SQS를 조합하여 사용하는 이 솔루션은 서버리스 아키텍처를 구현하여 애플리케이션의 성능을 개선하고 현대화하는 가장 효율적인 방법을 제공합니다:
-
Amazon API Gateway: RESTful API를 쉽게 생성, 게시, 유지 관리, 모니터링 및 보호할 수 있게 해주는 완전관리형 서비스입니다. 이는 기존 애플리케이션의 RESTful 서비스 요구사항을 충족시킵니다.
-
AWS Lambda: 서버를 프로비저닝하거나 관리할 필요 없이 코드를 실행할 수 있게 해주는 서버리스 컴퓨팅 서비스입니다. 애플리케이션 계층을 Lambda 함수로 구현함으로써, 자동 스케일링과 높은 가용성을 확보할 수 있습니다.
-
Amazon SQS: 완전관리형 메시지 대기열 서비스로, 마이크로서비스, 분산 시스템 및 서버리스 애플리케이션을 분리하고 확장하는 데 사용됩니다. SQS를 사용하면 한 계층이 오버로드될 때 트랜잭션이 삭제되는 문제를 해결할 수 있습니다.
이 조합은 확장성이 뛰어나고 관리가 용이하며, 비용 효율적인 서버리스 아키텍처를 제공합니다. 각 서비스가 자동으로 확장되므로 수동 개입이 최소화되어 운영 효율성이 극대화됩니다.
<small>This solution, using a combination of Amazon API Gateway, AWS Lambda, and Amazon SQS, provides the most operationally efficient way to improve and modernize the application by implementing a serverless architecture:
-
Amazon API Gateway: A fully managed service that makes it easy to create, publish, maintain, monitor, and secure APIs at any scale. This meets the RESTful service requirements of the existing application.
-
AWS Lambda: A serverless compute service that lets you run code without provisioning or managing servers. By implementing the application tiers as Lambda functions, you get automatic scaling and high availability.
-
Amazon SQS: A fully managed message queuing service used to decouple and scale microservices, distributed systems, and serverless applications. Using SQS addresses the issue of transactions being dropped when one tier becomes overloaded.
This combination provides a highly scalable, easily manageable, and cost-effective serverless architecture. Each service scales automatically, minimizing manual intervention and maximizing operational efficiency.</small>
오답 설명 - Incorrect Explanations
B. Amazon CloudWatch 지표를 사용하여 EC2 인스턴스 크기를 늘리는 방법:
이 접근 방식은 확장성이 제한적이며, 피크 부하에 맞춰 리소스를 과도하게 프로비저닝하게 됩니다. 또한 애플리케이션을 현대화하거나 트랜잭션 손실 문제를 직접적으로 해결하지 않습니다.
<small>B. Using Amazon CloudWatch metrics to increase EC2 instance size:
This approach has limited scalability and leads to over-provisioning resources for peak loads. It doesn't modernize the application or directly address the issue of transaction loss.</small>
C. Amazon SNS와 EC2 Auto Scaling 그룹 사용:
SNS는 메시지 대기열 서비스가 아니라 게시-구독 메시징 서비스입니다. 애플리케이션 서버 간 통신에는 적합하지 않으며, 트랜잭션 손실 문제를 해결하지 못합니다.
<small>C. Using Amazon SNS with EC2 Auto Scaling groups:
SNS is a publish-subscribe messaging service, not a message queuing service. It's not suitable for communication between application servers and doesn't address the transaction loss issue.</small>
D. Amazon SQS와 EC2 Auto Scaling 그룹 사용:
이 옵션은 SQS를 올바르게 사용하지만, EC2 인스턴스를 관리해야 하므로 A 옵션에 비해 운영 효율성이 떨어집니다. 또한 애플리케이션을 완전히 현대화하지 않습니다.
<small>D. Using Amazon SQS with EC2 Auto Scaling groups:
While this option correctly uses SQS, it still requires managing EC2 instances, making it less operationally efficient than option A. It also doesn't fully modernize the application.</small>
결론 - Conclusion
이 문제는 온프레미스 애플리케이션을 AWS 클라우드로 마이그레이션하면서 성능을 개선하고 현대화하는 최적의 방법을 테스트합니다. 서버리스 아키텍처(API Gateway, Lambda, SQS)를 활용하는 솔루션이 가장 효율적이며 확장 가능한 접근 방식입니다. 이는 수동 관리를 최소화하고, 자동 스케일링을 제공하며, 애플리케이션 계층 간의 효과적인 통신을 보장합니다. 클라우드 마이그레이션 시 단순히 기존 아키텍처를 클라우드로 옮기는 것이 아니라, AWS의 관리형 서비스를 활용하여 애플리케이션을 재설계하고 최적화하는 것이 중요합니다.
<small>This question tests the understanding of the best approach to migrate an on-premises application to AWS Cloud while improving performance and modernizing it. The solution leveraging serverless architecture (API Gateway, Lambda, SQS) is the most efficient and scalable approach. It minimizes manual management, provides automatic scaling, and ensures effective communication between application tiers. When migrating to the cloud, it's important not just to lift-and-shift existing architecture, but to redesign and optimize applications using AWS managed services.</small>
댓글
댓글 쓰기