s3nti3ntB
s3nti3ntB

Reputation: 421

AWS ECS reserving Tasks

I have a cluster on ECS with EC2 type. My task (container) needs to load a really large file upon startup, which means that it is not able to serve requests for 20-30 seconds after the startup. I would still like to have optimal scalability and performance. I have configured auto scaling of EC2 instances based on CapacityProviderReservation and my Service which runs tasks has configured auto scaling based on AverageCPUUtilization.

I would like to know the best practices and options in this kind of scenario. Is there some way to "reserve" tasks in the cluster so that they are available momentarily when we need them?

Upvotes: 0

Views: 77

Answers (1)

Shahad
Shahad

Reputation: 781

There is no way to 'reserve' or 'pre launch' tasks, otherwise they may as well get put in service as soon as they're launched to help spread out the load instead of sitting their idle waiting for the load to go up. I'd recommend decreasing the CPU threshold of the scaling policy so that it starts to scale faster.

Upvotes: 1

Related Questions