

# SUS03-BP01 最佳化非同步與排程任務的軟體和架構
<a name="sus_sus_software_a2"></a>

 使用高效率的軟體設計和架構，將每個工作單元所需的平均資源降至最低。實作可平均利用元件的機制，減少任務之間的閒置資源，並將負載尖峰的影響降至最低。 

 **若未建立此最佳實務，暴露的風險等級：** 低 

## 實作指引
<a name="implementation-guidance"></a>
+  將不需要立即處理的請求放入佇列。 
+  增加序列化，讓使用率在不同管道中變得平均。 
+  修改個別元件的容量，避免閒置資源等待輸入。 
+  建立緩衝區，並建立速率限制，讓外部服務的消耗變得順暢。 
+  使用最有效的可用硬體來進行軟體最佳化。 
+  使用佇列驅動的架構、管道管理和隨需執行個體工作者，最大化批次處理的使用率。 
+  妥善安排任務，避免同時執行的負載尖峰和資源爭用。 
+  在一天電力碳強度最低的時段安排工作。 

## 資源
<a name="resources"></a>

 **相關文件：** 
+  [什麼是 Amazon Simple Queue Service？](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html) 
+  [什麼是 Amazon MQ？](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/welcome.html) 
+  [根據 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) 
+  [什麼是 Amazon EventBridge？](https://docs.aws.amazon.com/eventbridge/latest/userguide/what-is-amazon-eventbridge.html) 

 **相關影片：** 
+  [在 AWS 上建立永續性](https://www.youtube.com/watch?v=ARAitMSIxc8) 
+  [移至事件驅動型架構](https://www.youtube.com/watch?v=h46IquqjF3E) 