An ecommerce company wants to launch a one-deal-a-day website on AWS. Each day will feature exactly one product on sale for a period of 24 hours. The company wants to be able to handle millions of requests each hour with millisecond latency during peak hours.
Which solution will meet these requirements with the LEAST operational overhead?
A. Use Amazon S3 to host the full website in different S3 buckets. Add Amazon CloudFront distributions. Set the S3 buckets as origins for the distributions. Store the order data in Amazon S3.
B. Deploy the full website on Amazon EC2 instances that run in Auto Scaling groups across multiple Availability Zones. Add an Application Load Balancer (ALB) to distribute the website traffic. Add another ALB for the backend APIs. Store the data in Amazon RDS for MySQL.
C. Migrate the full application to run in containers. Host the containers on Amazon Elastic Kubernetes Service (Amazon EKS). Use the Kubernetes Cluster Autoscaler to increase and decrease the number of pods to process bursts in traffic. Store the data in Amazon RDS for MySQL.
D. Use an Amazon S3 bucket to host the website's static content. Deploy an Amazon CloudFront distribution. Set the S3 bucket as the origin. Use Amazon API Gateway and AWS Lambda functions for the backend APIs. Store the data in Amazon DynamoDB.
D
技巧:排除明顯錯誤選項,在沒有明顯錯誤的選項中選擇最合理的選項。
某電商公司希望在 AWS 上推出每日一單(one-deal-a-day)網站服務。其核心需求包括高并發處理能力、低延遲和最低運維開銷。具體包括每小時需處理數百萬請求,在高峰時段要求毫秒級響應,需要一種易于管理、自動化的解決方案,減少人工干預。
A. 不正確。使用 Amazon S3 + CloudFront,訂單數據存儲在 S3 存儲桶。網站靜態內容存儲在 S3 存儲桶,通過 CloudFront 全球分發,訂單數據直接存儲在 S3(如 JSON 文件)。問題是S3 是靜態存儲服務,無法處理后端動態邏輯(如用戶認證、訂單處理、庫存更新等),也不是數據庫,無法高效處理高頻事務性寫入(如訂單提交)。另外動態請求(如獲取庫存狀態)需回源到應用服務器,無法通過 CloudFront 緩存,會導致延遲增加。無法滿足動態業務需求,運維開銷雖低,但功能缺失嚴重。
B. 不正確。使用 EC2 Auto Scaling + ALB + RDS for MySQL 服務。網站部署在 EC2 實例上,通過 Auto Scaling 橫向擴展,使用 ALB 分發流量,RDS for MySQL 存儲數據。主要問題是,需管理 EC2 實例、操作系統、安全補丁等,運維開銷高。Auto Scaling 需時間啟動新實例,高峰時段可能無法立即響應,存在冷啟動風險。RDS for MySQL 在高并發下可能成為性能瓶頸(如連接數限制、鎖競爭),存在數據庫瓶頸。雖能滿足性能需求,但運維復雜度高,不符合最低運維開銷要求。
C. 不正確。使用 Amazon EKS(Kubernetes) + RDS for MySQL 服務。應用容器化,部署在 EKS 上,通過 Kubernetes Cluster Autoscaler 擴展,使用 RDS for MySQL 存儲數據。主要問題是,需管理 Kubernetes 集群、容器編排、網絡策略等,運維開銷極高;RDS for MySQL 在高并發下可能表現不佳,存在數據庫瓶頸;Kubernetes 適合微服務架構,但單日一單場景無需復雜編排,不適合簡單業務場景。
D. 正確。使用 S3 托管靜態內容 + CloudFront + API Gateway + Lambda + DynamoDB 服務。網站前端(HTML/CSS/JS)存儲在 S3 存儲桶中,通過 CloudFront 分發。使用 API Gateway + Lambda 處理后端請求(如用戶登錄、訂單提交)。使用 DynamoDB 存儲訂單和用戶數據。該方案優勢明顯,采用 CloudFront 服務,為 S3 存儲桶中的靜態內容提供全球緩存,減少后端壓力。API Gateway 提供 RESTful 接口,簡化后端開發。Lambda 和 DynamoDB 無需手動配置容量,可自動處理高并發,也無需管理服務器、操作系統或數據庫實例。Lambda 可以輕松實現毫秒級響應,無冷啟動時(預置并發可優化),適合高頻請求。DynamoDB 提供高吞吐量,單表設計可輕松支持每秒數萬次寫入。以上 AWS 服務都可以按需付費,無閑置資源浪費。