I have an instance with multiple tomcat applications and standalone jars running. If the machine has 2vcpu and 8GB RAM the individual applications can use use the resources on demand(based on the Xms and Xmx values set for tomcat and for the individual jars). ECS is not in the picture at this point.
Now I'll be moving the application to containers on EC2 instances(not fargate). Is it possible to have task definitions where I specify the cpu and memory which sums up to be greater than the actual cpu or RAM of the EC2 host?
Because I don't expect all applications to to be utilizing 100% of the memory allocated to it during creation of the task definition. Would it work to have an ECS host with 4vcpus and I place 10 tasks on it all with 4vcpus specified in task definition? I know the tasks won't utilize 4vcpu but I want that if any of the task needs to use, they shouldn't be restricted to use full capacity of the host
I'm aware ECS has scaling capabilities which I plan to use. But I'm aiming to ensure that I don't over provision the number of EC2 hosts I'm using for ECS