System ArchitectureDevOps Engineer, Backend Developer

What is Zero Downtime Deployment in the context of IT system architecture and how to implement it?

Pass interviews with Hintsage AI assistant

Answer.

Zero Downtime Deployment is the practice of updating an application without interrupting operation and making it unavailable to users. This is achieved by sequentially taking out old instances and introducing new ones.

An example implementation for a stateless application in the cloud (for instance, using Kubernetes):

  1. Deploy the new version of pods without killing the old ones.
  2. Check that the new instances are healthy.
  3. Only then route traffic to them (blue-green/release or rolling update).
  4. Old containers are smoothly shut down after complete confidence in the new version.

Example deployment.yaml with rolling update:

apiVersion: apps/v1 kind: Deployment metadata: name: my-app spec: replicas: 4 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 template: metadata: labels: app: my-app spec: containers: - name: app image: my-app:v2

Key features:

  • Requires stateless services or specialized state migration strategies.
  • Often implemented through rolling updates or blue-green deployments.
  • For zero downtime at the DB level, multi-step migrations are required (backward/forward-compatible schemas).

Trick questions.

Is Zero Downtime Deployment impossible when changing the data schema?

It is possible if schema migrations are done in two steps: first, the code becomes compatible with both the old and new schema, then the migration itself and removal of legacy code.

If the application is stateless, is zero downtime deployment always guaranteed?

No! The limiting factor can be external state, connection timeouts, unprocessed requests, or unsupported reverse-incompatible changes in the API.

Is Zero Downtime Deployment only needed by large companies?

No. Even small startups and SaaS solutions require zero downtime as a critical factor for user experience (especially in global markets and high-load scenarios).