I have a task placement strategy of
- binpack(memory)
- spread(InstanceId)
I understand that binpack(memory) tries to cram as much tasks into an instance to use as much memory as possible, while spread(InstanceId) spreads the tasks among instances.
Is the task placement strategy above then conflicting and nonsensical? Would there be some scenario where it makes sense?
CodePudding user response:
In your specific case, I don't see a point of your spread
strategy. binpack
will take precedence anyway. If you want to use spread
, it would make more sense to spread
across AZs first, and then use binpack
:
spread(attribute:ecs.availability-zone),binpack(memory)
This way, ECS will first spread
the tasks evenly across AZs for high-availability, and then use binpack
to maximize memory usage of the instances in each AZ.