What Actually Happens During an ECS Rolling Deployment 0 ▲ muhammadraza.me 1 hour ago · 14 min read2888 words · Tech · hide · 0 comments You push a new image, update an ECS service, and the console says Deployment in progress. Then it sits there. A new task appears in PENDING. It changes to RUNNING, but the old task does not go away. A minute later the old one starts draining. Eventually it disappears and the service returns to steady state. If you only watch the task count, the whole thing looks oddly slow and a little random. It is neither. Four systems are working on the deployment at the same time: The ECS scheduler is enforcing minimum and maximum task counts. The ECS agent or Fargate runtime is provisioning the task and starting its containers. The load balancer is deciding whether the new target should receive traffic. The old container is trying to finish requests before ECS kills it. Most of the confusing failures I see come from treating those four systems as one thing. A task can be running but not ready. It can be healthy in ECS but unhealthy in the target group. It can be removed from the load balancer and… No comments yet. Log in to reply on the Fediverse. Comments will appear here.