← Google Interview Insights

Google·Software Engineer·Onsite - System Design / Architecture·Staff

Staff
May 2026

Summary

Google EM interview with a single system design question about migrating data between two distributed systems. Pretty open-ended, which I wasn't fully prepared for.

Questions Asked (1)

Q1

Design a solution to migrate data from Cassandra in one system to another system.

System DesignTechnical Trade-offsData Modeling
Author's notes

I jumped straight into talking about batch jobs and CDC (change data capture) without first clarifying what 'System Y' actually needed.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: data volume, velocity, consistency needs, and downtime tolerance. Then propose a phased migration strategy using dual-writes or change data capture (CDC) to keep systems in sync, with validation and rollback plans. Finally, discuss trade-offs between approaches and how you would handle schema differences and data transformation.

Pro tip: Emphasize idempotency and exactly-once semantics in your migration pipeline to avoid data duplication or loss, and always include a rollback strategy. Mention that you would monitor lag and data consistency metrics throughout the migration.

1. Clarify Requirements and Constraints

Ask about data size, write throughput, acceptable downtime, consistency requirements, and target system capabilities. This shapes the migration approach.

2. Choose Migration Strategy

Decide between offline (batch) vs online (live) migration. For online, consider dual-writes, CDC, or a combination. Discuss trade-offs like complexity, latency, and consistency.

3. Design Data Pipeline and Transformation

Outline how data will be read from Cassandra (e.g., using Spark or custom readers), transformed to fit the target schema, and written to the new system. Address idempotency and error handling.

4. Ensure Consistency and Validation

Implement validation checks (e.g., row counts, checksums) and reconciliation processes. Plan for handling discrepancies and ensuring eventual consistency.

5. Plan Cutover and Rollback

Define steps to switch traffic to the new system, including a rollback plan if issues arise. Consider a gradual cutover with canary testing.

Key Points to Mention

  • Dual-write pattern with eventual consistency and conflict resolution
  • Change Data Capture (CDC) using Cassandra commit log or triggers
  • Idempotent writes and exactly-once processing semantics
  • Data validation and reconciliation techniques (checksums, sampling)
  • Handling schema evolution and data transformation
  • Monitoring and alerting for migration lag and errors

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.