I came across the below question in the acloudguru mock test, (the answer is 4) but can some one please clarify the explanation. What does it mean by ‘generally used for transient workloads and our datastore would be something we’d want to persist’. The moment I saw ‘would be best for them to minimize maintenance’ – I chose Fargate because – it is perfect to run containers without having to manage servers or clusters. With AWS Fargate, you no longer have to provision, configure, and scale clusters of virtual machines to run containers.
I am struggling to understand the right usecase for fargate vs containers via ECS.
You are assisting a company in the migration of their container-based web landscape over to Amazon. They have a total of 21 containers which comprise their DEV, QA and Production environments. All environment are identical in design and size. Each environment consists of 3 web servers, 3 app servers and 1 datastore server. Given the landscape, which of the provided options would be best for them to minimize maintenance?
1. Deploy the web and app servers in each environment using ECS. Provision an RDS instance for each environment. Use AWS Systems Manager to provide a common management console.
2. Redeploy the web landscape on a MEAN stack under Elastic Beanstalk, making use of auto-scaling groups to right-size the respective environments.
3. Deploy the web, app and database containers using ECS. Make use of Fargate for the underlying ECS infrastructure.SELECTED
4. Deploy the web, app and database servers using ECS on EC2. Purchase 1-year reserved instance contracts for the required EC2 instances.
Deploying containers via ECS is a good option but we would want to use the EC2 hosted path.
Fargate is generally used for transient workloads and our datastore would be something we’d want to persist. We might be able to deploy the data store with RDS, but the question does not make it clear if the data store is an RDS-supported database. It could be a NoSQL data store or some other database unsupported by RDS. Similarly, a MEAN stack under Elastic Beanstalk might not be compatible with our landscape either.
Hi Deepak and Brian,
Pro-level questions will have multiple dimensions that you must take into account. If you picked Fargate because you saw "minimize maintenance", then you have fallen into a trap that AWS will set for you. You were looking for an answer rather than eliminating answers.
Additionally, Pro questions are not written as complete scenarios. They are intentionally short on details and you must infer some things and not assume other things. Brian falls into this trap too by assuming that RDS will work for our landscape. The data store might be DB2, MongoDB or simple file storage…obviously none of which work with RDS…the question does not say so we cannot assume.
Using containers does not mean that we cannot persist data. In fact, AWS specifically recommends if you need to persist data, use the EC2 hosted version of ECS. They specifically recommend against using Fargate as there’s not a good way to manage the underlying resources and therefore not easy to persist data without lots of extra work.
Read-up on this here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html