I'm new to docker and ECS, so I might not use the right terms. Please let me know if I need to clarify.
My Scenario: I have a number of independent containers. Each container represents a web site. Each container should run all the time, but might see long periods of inactivity (e.g. zero CPU usage). For illustration, let's assume I have 10 containers and each container requires up to 200MB RAM and up to 1vCPU. Let's further assume that I only need 2vCPU total to handle the combined load from all 10 containers (since they don't see high load all at the same time).
Fargate Option 1: I create a different task for each container: (2GB, 1vCPU) x 10 (2GB is minimum RAM for 1vCPU).
Fargate Option 2: I create a single task with all containers: (2GB, 2vCPU).
EC2 Option: I create a task per container, all mapped to a single EC2 instance.
If I understand correctly, Fargate Option 2 is much cheaper than Fargate Option 1 because I know I only need a maximum of 2vCPU. But Option 2 is a lot less flexible since it is tasks that are stopped/started/scaled and I want to treat my containers as independent of each other (e.g. stop/start/scale independently).
Furthermore, if I understand correctly, the EC2 Option is the only way I can get both the flexibility of having a task per container as well as paying for the resources I actually need.
So: It seems that for independent containers with low resource utilization, Fargate is not a good fit at this time.
Is my understanding correct?