Deploying software updates to a single server is simple: stop the process, update the executable, run database migrations, and start the process. However, in an enterprise 24/7 distributed system handling millions of active users, taking maintenance windows or locking database tables is completely unacceptable. A single ALTER TABLE users ADD COLUMN phone VARCHAR(20) NOT NULL DEFAULT ''; can lock a 500-million-row PostgreSQL table for 45 minutes, halting all production transactions.
Modern site reliability and distributed engineering demand zero-downtime practices:
- Deployment Topologies: Comparing Rolling Updates, Blue-Green deployments, and progressive Canary releases backed by automated statistical analysis (e.g., Kayenta, Argo Rollouts).
- Expand-Contract (Parallel Run) Schema Migrations: Decoupling database changes from code deployments through multi-phase migrations that maintain backward and forward schema compatibility across multiple concurrently running versions.
- Disaster Recovery (DR) Engineering: Modeling Recovery Point Objective (RPO) and Recovery Time Objective (RTO), and engineering automated DNS/BGP regional failover and deterministic failback mechanisms.
This module details the exact protocols and automation needed to ship multiple releases per day and withstand total cloud datacenter catastrophic failures.