Zero-downtime deployment means updating an application to a new version without any period where it's unavailable to users, typically achieved through blue-green, rolling, or canary deployment strategies combined with health checks.
Key Points: • Blue-green deployment runs two full environments and switches traffic over only after the new version is verified, with an instant rollback path. • Rolling deployment updates a small batch of instances at a time, keeping the rest serving traffic, so the application as a whole never goes fully offline. • Canary releases gradually shift a small percentage of traffic to the new version first, limiting the blast radius if something's wrong. • A load balancer combined with readiness health checks ensures traffic is only routed to instances that are confirmed healthy at every stage of the rollout. • Database schema changes need to be backward-compatible during the transition, since old and new application versions may briefly run against the same database.
Example: A team rolls out a new API version to 10% of instances first, watches error rates via monitoring, and only proceeds to update the rest once the canary shows no regressions, avoiding any full outage even if the new version had a bug.
Interview Tip: A concise interview answer is:
"I'd use a rolling or blue-green deployment strategy, backed by load balancer health checks so traffic only goes to instances that are actually ready. For riskier changes, a canary rollout to a small percentage of traffic first limits the blast radius, and any database changes need to stay backward-compatible during the transition."