Zero Downtime Database Migrations and Deployments
summary
Claims a live ecommerce stack with 300,000 daily visitors and deploy 10–30 times a day, using decoupled, backward‑compatible migrations: add new column, deploy code that writes it, batch-fill historic rows, then make it non‑NULL; remove columns by making them optional, stop using them, then drop. Uses atomic blue/green releases via per‑release directories and a symlink swap, optional PHP‑FPM pools to warm opcache, and advises logging HTTP 502/504 and prepopulating caches to avoid post‑deploy storms.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:04The case for frequent releases
- 6:42Dangers of maintenance modes
- 8:00Decoupling DB and code
- 8:55Database migration strategies
- 14:06Managing concurrent changes
- 15:42Advanced schema refactoring
- 17:29Creating and extending tables
- 19:37Non-database service updates
- 22:27Automated atomic deployment
- 25:00Blue-green deployment basics
- 27:06Handling PHP-FPM and cache
- 29:46Cache warming and management
- 32:31Logging and conclusion
related talks
32mZero Downtime Deploys Made Easy
40mStrategies for Zero Down Time, Frequent Deployments
35mDatabase migrations without downtime
33mDatabase Schema Migrations with Zero Downtime
37mDatabase Schema Migrations with Zero Downtime
26mThe Many Ways to Deploy Continuously
24mContinuous Deployment at Scale
21mHigh-Availability Django
