16. Docker (ECS, ECR, Fargate) Flashcards
What is the ECS “binpack” strategy?
- ECS task placement strategy
- place tasks based on the least available amount of CPU or memory
- This minimizes the number of instance in use (cost savings)
- Tries to maximize EC2 instances in use
What is the ECS “spread” strategy?
- place the task evenly based on the specified value
- Example: instanceId, attribute:ecs.availability-zone
What is the ECS “distinctInstance” constraint?
- ECS task placement constraint
- place each task on a different container instance
What is the ECS “memberOf” constraint?
- ECS task placement constraint
- places task on instances that satisfy an expression
- Uses the Cluster Query Language (advanced)
- Example: only place these types of tasks on t2 instances
What is Fargate?
- Serverless ECS (serverless containers / docker)
- no more EC2 to provision!
- AWS provisions containers for us and assigns them ENI
What are the 3 ECS “flavors”?
- ECS Classic
- Fargate
- EKS
What is an ECS Cluster?
Multiple EC2 instances which will house the docker containers
What is an ECS Task Definition?
A JSON file that defines the configuration of (up to 10) containers you want to run
What is an ECS Task?
Tasks launch containers defined in the Task Definition.
Tasks do not remain running once their workload is complete.
What is an ECS Service?
A Service ensures tasks remain running (e.g. web-apps)
What is an ECS Container Agent?
A binary installed on each EC2 instance which monitors, starts, and stops tasks
If you want to run a service but it cannot have a cold start, what should you use?
You should use ECS.
Fargate and Lambda both have cold starts
What is the maximum memory of a Fargate service?
30 GB
What is the maximum memory of a Lambda service?
3GB
What is the maximum duration of a Fargate service?
As long as you want