How do you roll back a zero-downtime deployment if something goes wrong?
For Blue-Green deployments the roll-back is near instant, by flipping the other environment to process the traffic.
In a rolling deployment, this will take a bit longer as the existing deployment needs to be cancelled and a new one kicked off. This is either in the deployment process or via GitOps configuration change to last known good.
Custom rolling deployments can be created whereby new nodes are built and added, whilst the old nodes are removed from a load balancer group. This is how AWS ECS performs rolling updates and enables a much faster rollback.
With monitoring and health checks, rollback can be triggered automatically and therefore roll back to a stable state quicker.
For rolling deployments specifically, most orchestrators expose a direct rollback command (e.g. kubectl rollout undo in Kubernetes, or re-pointing an ECS service at the previous task definition) — this re-runs the same rolling process in reverse rather than requiring a fresh manual deploy of the old version.