Currently we duplicate at the service level which means we have to have
- Weighted DNS
- 2 Load Balancers
- 2 Services
- 2 sets of Tasks
Thats a lot of infrastructure to maintain, configure and adjust.
What if instead we used Tasks as our unit of duplication. They are way cheaper and easier to affect.
LB -> TargetGroup -> Taskv1, Taskv1, Taskv1
LB -> TargetGroup -> Taskv1, Taskv1, Taskv1, Taskv2
LB -> TargetGroup -> Taskv1, Taskv1, Taskv1, Taskv2, Taskv2
LB -> TargetGroup -> Taskv1, Taskv1, Taskv1, Taskv2, Taskv2, Taskv2
LB -> TargetGroup -> Taskv1, Taskv2, Taskv2, Taskv2
LB -> TargetGroup -> Taskv2, Taskv2, Taskv2
At any point we can rollback the count on Taskv2 or remove the rest of Taskv1.
Do you see any downsides?
this is basically what ecs-deploy does when releasing - maybe some way to hook into that e.g., longer wait periods or more specific health checks (CW metrics?). one nice thing about your approach is much less redundant infra to create. and DNS is out of the picture so weighting is easier to adjust on the fly.
maybe a downside would be you have to launch more tasks to do more granular weighting (target group weights aren't supported).