Back to sketch

SYSTEM DESIGN SKETCHBOOK / PRACTICE SHEET / NO. 51

Design a petabyte-scale migration to the cloud

Expert · 55 min · Data pipelines & analytics

A company is leaving its own data center. Its file store and its main transactional database must move to a public cloud while the business keeps running, and the leadership team wants proof that nothing was lost or corrupted, plus a way to go back if the new environment misbehaves.

Requirements

  • Copy all files and the database to the cloud while the source stays in production.
  • Keep the copy up to date with ongoing changes until cutover.
  • Verify that every file and every database row arrived intact before cutover.
  • Cut over with minimal write downtime, and keep a rollback path for two weeks afterwards.

Constraints and assumptions

  • File store: 4 PB in about 2 billion files; about 2 TB of files are created or modified per day; roughly 80% of bytes have not changed in six months.
  • Database: 20 TB relational database taking 5,000 writes per second at peak.
  • Network: a dedicated 10 Gbps link, of which about 7 Gbps is usable for migration.
  • The whole migration must finish within 90 days.
  • Database write downtime at cutover must be under 15 minutes.

Out of scope for the first sketch

Rewriting applications for cloud-native services · Access control and identity mapping between environments · Cost optimization after the move

Draw your design

Rough math and notes

Done on paper? Compare with the worked approaches