

# SUS03-BP01 비동기식 및 예약된 작업을 위한 소프트웨어 및 아키텍처 최적화
<a name="sus_sus_software_a2"></a>

배포된 리소스의 일관되고 높은 사용률을 유지할 수 있도록 대기열 기반과 같은 효율적인 소프트웨어 및 아키텍처 패턴을 사용합니다.

 **일반적인 안티 패턴:** 
+  클라우드 워크로드의 리소스를 과다하게 프로비저닝하여 예상치 못한 수요 급증이 발생합니다.
+  아키텍처가 메시징 구성 요소에 의한 비동기식 메시지의 발신자와 수신자를 분리하지 않습니다.

 **이 모범 사례 확립의 이점:** 
+  효율적인 소프트웨어 및 아키텍처 패턴이 워크로드의 미사용 리소스를 최소화하고 전체적인 효율성을 개선합니다.
+  비동기식 메시지 수신과 관계없이 처리 규모를 조정할 수 있습니다.
+  메시징 구성 요소를 통해 가용성 요구 사항이 완화되어 더 적은 리소스로 이를 충족할 수 있습니다.

 **이 모범 사례가 확립되지 않을 경우 노출되는 위험 수준:** 중간 

## 구현 지침
<a name="implementation-guidance"></a>

 구성 요소의 사용률을 균등하게 하고 워크로드의 과다한 프로비저닝을 최소화하는 [이벤트 기반 아키텍처](https://aws.amazon.com/event-driven-architecture/)와 같은 효율적인 아키텍처 패턴을 사용합니다. 효율적인 아키텍처 패턴을 사용하면 시간 경과에 따른 수요 변화로 인해 사용하지 않는 유휴 리소스를 최소화할 수 있습니다.

 워크로드 구성 요소의 요구 사항을 이해하고 리소스의 전체 사용률을 높이는 아키텍처 패턴을 도입합니다. 더 이상 필요하지 않은 구성 요소를 폐기합니다.

### 구현 단계
<a name="implementation-steps"></a>
+  워크로드에 대한 수요를 분석하여 이에 대한 대응 방법을 결정합니다.
+  동기식 응답이 필요하지 않은 요청이나 작업의 경우 대기열 기반 아키텍처 및 Auto Scaling 작업자를 사용하여 사용률을 극대화합니다. 대기열 기반 아키텍처를 고려해야 하는 몇 가지 예는 다음과 같습니다.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/wellarchitected/2024-06-27/framework/sus_sus_software_a2.html)
+  언제든 처리할 수 있는 요청이나 작업의 경우 더 높은 효율을 위해 예약 메커니즘을 사용하여 작업을 일괄 처리합니다. AWS의 예약 메커니즘의 예는 다음과 같습니다.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/wellarchitected/2024-06-27/framework/sus_sus_software_a2.html)
+  아키텍처에서 폴링과 웹후크 메커니즘을 사용하는 경우 이를 이벤트로 바꿉니다. [이벤트 기반 아키텍처](https://docs.aws.amazon.com/lambda/latest/operatorguide/event-driven-architectures.html)를 사용하여 매우 효율적인 워크로드를 구축합니다.
+  [AWS의 서버리스](https://aws.amazon.com/serverless/)를 활용하여 과도하게 프로비저닝된 인프라를 제거합니다.
+  입력 대기 중인 유휴 리소스를 방지하기 위해 아키텍처의 개별 구성 요소의 적절한 크기를 지정합니다.
  +  [AWS Cost Explorer의 적정 크기 조정 권장 사항](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-rightsizing.html) 또는 [AWS Compute Optimizer](https://aws.amazon.com/compute-optimizer/)를 사용하여 적정 크기 조정 기회를 식별할 수 있습니다.
  +  자세한 내용은 [올바른 크기 조정: 워크로드에 맞게 인스턴스 프로비저닝](https://docs.aws.amazon.com/whitepapers/latest/cost-optimization-right-sizing/cost-optimization-right-sizing.html)을 참조하세요.

## 리소스
<a name="resources"></a>

 **관련 문서:** 
+  [What is Amazon Simple Queue Service?](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html)
+  [What is Amazon MQ?](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/welcome.html)
+  [Scaling based on Amazon SQS](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-using-sqs-queue.html) 
+  [이란??AWS Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html)
+  [란 무엇인가요??AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)
+  [Amazon SQS에서 AWS Lambda 사용](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html) 
+  [What is Amazon EventBridge?](https://docs.aws.amazon.com/eventbridge/latest/userguide/what-is-amazon-eventbridge.html)
+ [ Managing Asynchronous Workflows with a REST API ](https://aws.amazon.com/blogs/architecture/managing-asynchronous-workflows-with-a-rest-api/)

 **관련 비디오:** 
+ [AWS re:Invent 2023 - Navigating the journey to serverless event-driven architecture ](https://www.youtube.com/watch?v=hvGuqHp051c)
+ [AWS re:Invent 2023 - Using serverless for event-driven architecture & domain-driven design ](https://www.youtube.com/watch?v=3foMZJSPMI4)
+ [AWS re:Invent 2023 - Advanced event-driven patterns with Amazon EventBridge ](https://www.youtube.com/watch?v=6X4lSPkn4ps)
+ [AWS re:Invent 2023 - Sustainable architecture: Past, present, and future ](https://www.youtube.com/watch?v=2xpUQ-Q4QcM)
+ [ Asynchronous Message Patterns \$1 AWS Events ](https://www.youtube.com/watch?v=-yJqBuwouZ4)

 **관련 예제:** 
+ [AWS Graviton 프로세서 및 Amazon EC2 스팟 인스턴스를 사용하는 이벤트 기반 아키텍처 ](https://catalog.workshops.aws/well-architected-sustainability/en-US/2-software-and-architecture/event-driven-architecture-with-graviton-spot)