Netflix Billing Migration to AWS — Part III

Netflix Technology Blog
12 min readintermediate
--
View Original

Overview

This article discusses Netflix's migration of its billing system to AWS, focusing on the complexities of database migration. It highlights the challenges faced, the architecture choices made, and the tools utilized to ensure a successful transition.

What You'll Learn

1

How to choose the right database for a billing application

2

Why data integrity is crucial during database migration

3

How to implement high availability in database architecture

4

When to use GoldenGate for data migration

Prerequisites & Requirements

  • Understanding of database management systems and migration processes
  • Familiarity with AWS services and database tools like GoldenGate(optional)

Key Questions Answered

What challenges did Netflix face during the database migration?
Netflix encountered various challenges during its database migration, including different hardware between source and target, multiple operating system flavors, and the need for minimal downtime while migrating constantly changing data. These factors complicated the migration process significantly.
How did Netflix ensure data integrity during migration?
To maintain data integrity during migration, Netflix utilized various techniques such as data type validation, schema conversion, and thorough testing of application functionality on a copy of the production database. They also employed tools for data comparison to identify discrepancies.
What database architecture did Netflix implement for high availability?
Netflix designed its database architecture with high availability in mind, utilizing DRBD for synchronous replication across zones. This setup allowed for minimal downtime and ensured that data loss was avoided during infrastructure failures.
Why did Netflix choose EC2 MySQL for its billing application?
Netflix opted for EC2 MySQL due to the absence of licensing costs and the ability to migrate to AWS Aurora in the future. This choice facilitated the setup of MySQL on i2.8xlarge instances, meeting their storage and performance requirements.

Key Statistics & Figures

Total data migrated
10 TB
This was the size of the dataset that needed to be migrated during the billing system transition.
Instance type used for MySQL
i2.8xlarge
This instance type was chosen for its performance capabilities to handle the billing application's demands.

Technologies & Tools

Database
Oracle
Used as the source database before migration.
Database
AWS RDS Mysql
Considered for its managed services but ultimately not selected due to storage limits.
Database
AWS Aurora
Considered for future scalability but was in beta at the time of migration.
Migration Tool
Goldengate
Chosen for its ability to handle bulk loads and bi-directional replication.

Key Actionable Insights

1
Prioritize understanding the differences between source and target databases before migration.
Recognizing data type mismatches and schema differences early can prevent significant issues during migration, ensuring smoother transitions and better data integrity.
2
Implement a robust testing strategy to validate data integrity post-migration.
Using sample data sets and comparison tools can help identify discrepancies and ensure that the migrated data accurately reflects the source data.
3
Consider using tools like GoldenGate for complex migrations.
GoldenGate's features for bi-directional replication and bulk load restarts can significantly simplify the migration process, especially for large datasets.

Common Pitfalls

1
Underestimating the complexity of data type mismatches can lead to significant migration issues.
Different databases may have varying data types, and failing to address these can result in data integrity problems and application errors post-migration.
2
Neglecting to implement a comprehensive testing strategy can result in unnoticed discrepancies.
Without thorough testing and validation, migrated data may not accurately reflect the original, leading to potential business impacts.

Related Concepts

Database Migration Strategies
High Availability Architecture
Data Integrity In Migrations
AWS Services For Database Management