Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

221
Vistas
How does ECS Fargate auto scaling policy know not to kill a working task?

I have an ECS Fargate cluster with a service that generates tasks based on how many messages are in a queue. Each task does long polling on the queue and processes one message at a time. If the queue gets over 5 messages a new task is spun up and it starts taking messages. When the queue then drops below 5 messages from the previous threshold, it shuts down a task.

My question is, when the service decides to scale down, how does it know what task to kill? All tasks could be processing a message. Each task continuously runs and does long pulling from SQS, so how would it know that a task is in valid shut down state (just completed a message) and a non-valid shut down state (currently processing a message).

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

There is an open issue for improving termination of tasks as people have same concerns as you:

  • [ECS] [request]: Control which containers are terminated on scale in #125

From the issue, you can minimize the impact of termination of tasks on your processes by using stopTimeout. The parameter is:

Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.

But there is also a new feature for ESC:

  • Amazon ECS Introduces Enhanced Container Dependency Management

With this you can setup:

dependencies for container startup and shutdown as well as a per-container start and stop timeout value.

So generally there is no full control over termination of tasks, like you have in termination of instances in AutoScaling Group. But the things are getting worked on.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda