Q48 — AWS SAA-C03 第3章

第 48/65 题 | ← 返回第3章

Q178.一家公司正在本地构建容器化应用程序,并决定将该应用程序迁移到 AWS.该应用程序将很快拥有数千名用户部署后.该公司不确定如何大规模管理容器部署.公司需要将容器化应用部署在一种高度可用的架构,可最大限度地减少运营开销.哪种解决方案可以满足这些要求?

正确答案: A. 将容器镜像存储在 Amazon Elastic Container Registry (Amazon ECR) 存储库中.使用具有 AWS Fargate 启动类型的 Amazon Elastic Container Service (Amazon ECS) 集群来运行容器.使用目标跟踪根据需求自动扩展.

解析

To deploy a containerized application in a highly available architecture that minimizes operational overhead and meets the requirement of scaling automatically based on demand, a company should store container images in an Amazon Elastic Container Registry (Amazon ECR) repository. The company can then use an Amazon Elastic Container Service (Amazon ECS) cluster with the AWS Fargate launch type to run the containers and use target tracking to scale automatically based on demand. Therefore, option A is the correct answer.Option B suggests using the Amazon EC2 launch type instead of AWS Fargate to run the containers. While this approach could work, it may require more operational overhead compared to using AWS Fargate.Option C suggests storing container images in a repository that runs on an Amazon EC2 instance and running the containers on EC2 instances that are spread across multiple Availability Zones. This approach requires more configuration management and may not provide the desired scalability and elasticity compared to using Amazon ECS with the AWS Fargate launch type.Option D suggests creating an Amazon EC2 Amazon Machine Image (AMI) that contains the container image and launching EC2 instances in an Auto Scaling group across multiple Availability Zones. While this approach provides scalability and high availability, it requires more operational overhead compared to using Amazon ECS with the AWS Fargate launch type.Using an Amazon ECS cluster with the AWS Fargate launch type provides a fully managed service for deploying and running containers at scale without requiring any server or cluster management. Storing container images in Amazon ECR enables secure and easy management of container images. Using target tracking in Amazon ECS enables automatic scaling based on demand, which reduces operational overhead and ensures high availability of the application. This approach meets the requirements stated in the question. 要在一个高度可用的体系结构中部署容器化的应用程序,以最小化操作开销并满足根据需求自动伸缩的要求,公司应该将容器映像存储在Amazon Elastic container Registry (Amazon ECR)存储库中。然后,公司可以使用AWS Fargate启动类型的Amazon Elastic Container Service (Amazon ECS)集群来运行容器,并使用目标跟踪来根据需求自动扩展。因此,选项A是正确答案。选项B建议使用Amazon EC2启动类型而不是AWS Fargate来运行容器。虽然这种方法可以工作,但与使用AWS Fargate相比,它可能需要更多的操作开销。选项C建议将容器映像存储在运行在Amazon EC2实例上的存储库中,并在分布在多个可用区(Availability zone)上的EC2实例上运行容器。与使用Amazon ECS和AWS Fargate启动类型相比,这种方法需要更多的配置管理,并且可能无法提供所需的可伸缩性和弹性。选项D建议创建一个包含容器映像的Amazon EC2 Amazon Machine Image (AMI),并跨多个可用区在Auto Scaling组中启动EC2实例。虽然这种方法提供了可伸缩性和高可用性,但与使用Amazon ECS和AWS Fargate启动类型相比,它需要更多的操作开销。使用Amazon ECS集群和AWS Fargate启动类型,可以为大规模部署和运行容器提供完全托管的服务,而不需要任何服务器或集群管理。在Amazon ECR中存储容器映像可以安全、轻松地管理容器映像。在Amazon ECS中使用目标跟踪可以根据需求自动扩展,从而减少了操作开销并确保了应用程序的高可用性。这种方法符合问题中所述的要求。