[System Design] Data Migration

LiveRunGrow
6 min readSep 8, 2023
Online image

Problem Description

Multi-tenant online system; Migrate the data of some tenants to another data storage securely and with stability.

Step 1: Gather Requirements

First, we need to ask the interviewer some questions to clarify the requirements. Lets imagine the answers to those questions are in italics (If it sounds strange, it’s because I crafted them from my own imagination).

Functional

  • What kind of data do we want to migrate? User profile/account data
  • What’s the source and target schema? The schemas are the same.
  • What’s the source and target system? SQL Databases. They are the same, except hosted in different servers.
  • What kind of data is classified under the special tenant category and needs to be migrated? The purpose of the data migration project is to separate data belonging to users in different geographic regions to different servers. For example, we want to only move US Tiktok accounts to storage servers in the US.

Non functional

  • Does the system always need to be available? Can system downtime be accepted? System downtimes are not accepted.
  • Are we concerned about the time it takes for the data…

--

--

LiveRunGrow

𓆉︎ 𝙳𝚛𝚎𝚊𝚖𝚎𝚛 🪴𝙲𝚛𝚎𝚊𝚝𝚘𝚛 👩‍💻𝚂𝚘𝚏𝚝𝚠𝚊𝚛𝚎 𝚎𝚗𝚐𝚒𝚗𝚎𝚎𝚛 ☻ I write & reflect weekly about software engineering, my life and books. Ŧ๏ɭɭ๏ฬ ๓є!