AdvancedTechnical
5 min
Zero-Downtime Database Migration Strategy
DatabasesScalabilityMigrations
Advertisement
Interview Question
Describe your approach for performing a zero-downtime database migration in production.
Key Points to Cover
- Use expand-contract pattern: deploy schema changes safely
- Enable dual writes temporarily when moving data between tables
- Leverage feature flags to manage rollout safely
- Run load tests and dry runs before applying changes
Evaluation Rubric
Applies correct zero-downtime techniques30% weight
Mitigates risks with rollout control30% weight
Includes tests and dry runs20% weight
Monitors database health actively20% weight
Hints
- 💡Backfill asynchronously and phase out old schema carefully.
Potential Follow-up Questions
- ❓How would you handle migration rollbacks?
- ❓How do you prevent deadlocks during migrations?
Advertisement