Tetris scaling is a process that optimizes the task placement across the infrastructure of a cluster. When a task is launched in ECS, The ECS scheduler tries to find free capacity for the task to run, in some cases, there aren’t enough resources to meet the task’s demands.
When a task fails to start, ECS writes events that describe why the task was unable to run properly.The ECS Autoscaler automatically detects these events and launch additional instances as required. The most common error events are:
No Ports Available
No Container Instances
Figure B shows how Spotinst Infrastructure-aware Scheduler deals with various tasks types and assigns them to the right machine.
If required – a machine with the right resources for the task to be executed is launched.