Database Migration
Definition
Moving a database from one environment, platform, or version to another while maintaining data integrity and minimizing downtime.
Use Cases
- Netflix: Migrating parts of its data layer from Oracle to distributed NoSQL to improve scalability and availability for streaming workloads — Netflix adopted Apache Cassandra for highly available, horizontally scalable data storage and built migration processes to move data and traffic from legacy relational systems to Cassandra-backed services, using staged cutovers and validation to reduce risk (Improved resilience and scalability for high-traffic services by using a distributed datastore designed for multi-region, always-on operation)
- Airbnb: Moving from a single primary MySQL architecture toward a more scalable MySQL sharding approach to handle growth — Airbnb introduced a sharding layer and performed incremental data movement with careful validation and application changes to route reads/writes to the correct shard, using phased rollouts to minimize downtime (Enabled continued growth by reducing bottlenecks of a single database and improving operational scalability)
- Shopify: Scaling relational data storage for a rapidly growing commerce platform using MySQL sharding and online data movement techniques — Shopify evolved its database architecture with sharding and operational practices that support moving data while keeping the platform online, including controlled cutovers and extensive monitoring (Supported large-scale growth while maintaining uptime expectations for merchants and buyers)
Provider Equivalents
- AWS: AWS Database Migration Service (AWS DMS)
- Azure: Azure Database Migration Service
- GCP: Database Migration Service
- OCI: OCI Database Migration
Frequently Asked Questions
- What's the difference between database migration and database replication?
- Database migration is the overall process of moving a database to a new system (new cloud, new engine, new version, or new region) and then switching applications to use the new database. Replication is a technique often used during migration to keep source and target in sync (for example, continuous change data capture) so you can cut over with minimal downtime.
- When should I use database migration?
- Use database migration when you need to move off end-of-life hardware or software, reduce data center footprint, improve reliability, change database engines (for example, Oracle to PostgreSQL), upgrade major versions, consolidate databases, or move closer to users for latency and compliance. It’s especially useful when you can’t afford long downtime and need a staged approach with testing and a controlled cutover.
- How much does database migration cost?
- Cost depends on (1) data size and change rate (how much data changes during migration), (2) downtime requirements (online replication vs offline export/import), (3) network egress and connectivity (VPN/Direct Connect/ExpressRoute/Interconnect), (4) tooling and service charges (managed migration service instance hours, storage, logs), (5) target database costs (compute, storage, IOPS), and (6) engineering effort for schema conversion, application changes, testing, and validation. A common cost driver is running source and target in parallel during replication and testing.
Category: data
Difficulty: intermediate
Related Terms
See Also