We have an ECS cluster running a single task on Fargate. We want to set up deployments so that we have zero downtime while ensuring that traffic routes to only one task at a time.
By setting desiredCount
to 1, minimumHealthyPercent
to 100%, and maximumPercent
to 200%, ECS will launch one new task without first stopping the existing task. This gives us zero downtime.
However, how is traffic handled during this process? When ECS launches the new task, will it stop sending traffic to the existing task before routing traffic to the new one (which is our desired behavior)? Or will ECS route traffic to both tasks until the old task is stopped (which is what we want to avoid)?
Otterup is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.