CrackOps
Interview PrepTracksLinuxAWS LabSoonInterview RoomSoon
Sign inStart free
CrackOps

Interview prep for the people who keep production up.

[email protected]
ProductInterview PrepTracksDashboardInterview Room
RolesDevOpsSREPlatformCloud
CompanyAboutContactPrivacyTerms
© CrackOps
Tracks/Infrastructure System Design
Expert 5 minSystem design

How would you move a critical stateful service to another data centre with zero downtime?

Scenario

A professional social network's connections service (who is connected to whom) is backed by sharded MySQL: 1,024 logical shards on 64 primaries, about 30 TB, 150,000 reads and 12,000 writes a second. All primaries live in DC-1, whose lease ends in four months; the target is DC-3, 12 ms round trip away. Almost every product surface calls this service, and a binlog-based CDC stream feeds caches and search.

The interviewer asks

“The connections store has to leave its current data centre within four months, with no downtime and no lost writes. Walk me through the migration plan phase by phase, how you prove the data is identical, and how you roll back at each step.”

The 30-second answer

I'd run it as five reversible phases. First, replicate: clone every shard into DC-3 and attach the clones as GTID replicas, throttled so the 30 TB copy doesn't saturate the inter-DC link. Second, verify: chunked checksums at a known GTID, sampled dual reads compared off the request path, and domain invariants, then move DC-3's reads to the local replicas. Third, shadow writes: mirror production writes to the new DC-3 write tier in dry-run mode, to prove capacity and that it computes identical mutations. Fourth, cut over write ownership shard by shard, canary first: buffer writes in the router, fence the old primary with super_read_only, wait for the target to apply the final GTID, bump the ownership epoch, start reverse replication and release the buffer, for about two seconds of added latency per shard and no errors. Fifth, keep DC-1 as a reverse replica for two weeks as the rollback path, then decommission it.

Sign in to finish this question

A free account unlocks the rest of it, and saves your progress across every track.

  • The voiced mock interview (5 min)
  • The full senior answer, step by step
  • Animated architecture diagrams
  • The whole conversation, 12 turns
  • Deep dive: how it works, mistakes, risks and trade-offs
  • 3 copy-ready command snippets
  • 5 follow-up questions they'll ask next
  • A self-check of 8 things interviewers listen for
Create a free accountSign in

More Infrastructure System Design interview questions

  • How would you keep a trading platform up all through market hours and prove every change to an auditor?
  • Design disaster recovery for a trading platform with an RTO under 15 minutes and an RPO near zero.
  • You have two weeks to ship multi-region failover for live matches, and DNS failover is off the table. What do you build?
  • Design a UPI payments platform that rides a 10x festival peak without losing or double-charging a payment
  • Leadership wants active-active across two regions for payments. How do you keep transaction state strictly consistent?
  • Design reconciliation so money is never lost or duplicated, even when services crash mid-payment
All Infrastructure System Design questions