Expand Contract Pattern for Continuous Delivery of Databases
summary
Makes large schema changes safe and reversible by running old and new implementations in parallel, migrating data gradually, and then removing the legacy pieces; uses an abstraction layer, expand/contract pattern and branch by abstraction to route traffic, plus dual-write with triggers or background comparison to keep data in sync. Works in production (examples: GitHub parallel diff rollout, large orgs like Facebook/Google), avoids downtime, and reduces rollback risk. Requires versioned migrations, automation and strong tests; costs extra code and a defined window to contract.
AI-written summary · about
chapters (14)
- 0:00Start
- 4:31Branch by Abstraction
- 5:26Continuous Delivery
- 8:22Atomic Deployments
- 10:07Split Column
- 11:13Transition
- 14:09Split table
- 16:44Types of Refactoring
- 17:36Basics
- 22:50Upgrading Rails
- 24:07Software Releases Without Major Problems
- 25:16Murphy's Law
- 25:40Low risk releases
- 25:57References
related talks
19mExpand Contract Pattern for Continuous Delivery of Databases
43mPostgres schema migrations using the expand/contract pattern
45mEnabling Continuous Delivery with Database Practices
48mWinning at Continuous Deployment: The Art of Safe Contract Changes
21mApplying Continuous Delivery to Database Schema
37mDatabase Schema Migrations with Zero Downtime
41mSurviving Continuous Deployment in Distributed Systems
31mHelp! My Database Is The Bottleneck
