System Design Interview Questions and Answers
System design rounds ask you to design a working system in about 45 minutes and defend your tradeoffs. For data and machine learning roles the systems are usually data platforms, pipelines and ML services.
The questions below come from the Dataford question bank and are ranked by how often they show up across our engineering, data and ML interview guides.
Practice System design interviews with a coach
1:1 mock interviews, with written feedback after
See coachesWhat interviewers test
Requirements
Clarifying scope, scale, latency and consistency needs before you draw anything.
Architecture
Choosing storage, queues, caches and services, and explaining why.
Data and ML systems
Batch and streaming pipelines, feature stores, model serving and monitoring.
Tradeoffs
Cost, reliability and complexity, and what you would build first.
Data pipeline design questions
Ingestion, transformation and serving for analytics and data platform roles.
- 1.
Approach for maintaining data quality and integrity across ETL pipelines.
Practice this questionShow example answer
Approach
Architecture
flowchart LR SRC[Source Systems and Engineering Data] --> ING[Ingestion Layer] ING --> ORCH[Apache Airflow 2.x] ORCH --> VAL[Validation and Quality Checks] VAL --> DLQ[Quarantine and Error Store] VAL --> ETL[Apache Spark ETL Jobs] ETL --> STG[ADLS Gen2 Parquet Staging] STG --> WH[(Azure Synapse Analytics)] WH --> DBT[dbt Transformations and Tests] DBT --> SERV[Power BI and Downstream Consumers]
Data Flow
-
- Source systems export operational and telemetry data into Azure Data Lake Storage Gen2 through scheduled ingestion jobs managed by Apache Airflow 2.x.
-
- Airflow triggers Python validation tasks that check schema conformance, null thresholds, primary key uniqueness, and accepted value ranges before processing.
-
- Apache Spark 3.x ETL jobs read validated files, standardize timestamps, deduplicate by business key plus ingestion timestamp, and apply idempotent upsert logic.
-
- Records that fail validation or transformation rules are written to a quarantine zone in ADLS Gen2 with error codes for replay and root cause analysis.
-
- Cleaned datasets are stored as Parquet in curated staging folders, partitioned by load_date and source_system for efficient downstream loads.
-
- Azure Synapse Analytics loads curated data into raw and conformed tables, where dbt incremental models build trusted reporting layers with automated tests.
-
- Power BI dashboards and downstream consumers read only certified dbt models, while data quality metrics are published back to monitoring systems.
Solution
SQL Implementation
{{ config( materialized='incremental', unique_key='event_id' ) }} with source as ( select event_id, engine_id, cast(event_ts as datetime2) as event_ts, temperature_c, pressure_kpa, load_date from {{ source('raw', 'engine_events') }} where event_id is not null and engine_id is not null and temperature_c between -80 and 250 and pressure_kpa between 0 and 5000 {% if is_incremental() %} and load_date >= dateadd(day, -2, current_date) {% endif %} ) select * from sourcePython Implementation
from pyspark.sql import SparkSession, functions as F from pyspark.sql.window import Window spark = SparkSession.builder.appName("quality_etl").getOrCreate() raw_df = spark.read.parquet("abfss://raw@rrdatalake.dfs.core.windows.net/engine_events/") validated_df = ( raw_df .filter(F.col("event_id").isNotNull()) .filter(F.col("engine_id").isNotNull()) .filter(F.col("event_ts").isNotNull()) ) window_spec = Window.partitionBy("event_id").orderBy(F.col("ingested_at").desc()) deduped_df = ( validated_df .withColumn("rn", F.row_number().over(window_spec)) .filter(F.col("rn") == 1) .drop("rn") ) quarantine_df = raw_df.join(deduped_df.select("event_id"), on="event_id", how="left_anti") quarantine_df.write.mode("append").parquet("abfss://quarantine@rrdatalake.dfs.core.windows.net/engine_events/") deduped_df.write.mode("append").partitionBy("load_date").parquet( "abfss://curated@rrdatalake.dfs.core.windows.net/engine_events/" )Monitoring
- Alert if dbt source freshness exceeds 30 minutes for scheduled hourly loads.
- Alert if null rate for critical columns such as event_id or engine_id exceeds 0.5% in any batch.
- Alert if duplicate rate on event_id exceeds 0.1% after deduplication, indicating upstream replay or key issues.
- Alert if Airflow DAG success rate drops below 98% over a rolling 24-hour window.
- Alert if row count deviates by more than 25% from the 7-day moving average for the same source feed.
- Alert if quarantine volume exceeds 2% of daily records, triggering investigation before publication.
Failure Handling
- Route schema-invalid or malformed records to a quarantine zone with source file, offset, and validation error details for replay.
- Use idempotent loads keyed by event_id so retries after Spark or Airflow task failure do not create duplicates.
- Apply checkpointing in Spark jobs so processing can resume from the last committed state after executor or cluster interruption.
- Block downstream dbt model runs when critical source tests fail, preventing bad data from reaching reporting layers.
- Keep raw immutable landing data in ADLS Gen2 so corrupted transformations can be rebuilt from source without data loss.
- Version schemas and validation rules so breaking source changes are detected early and isolated instead of silently propagated.
-
- 2.
Approach for handling schema changes and data quality checks in a high-volume data lake pipeline.
Solve and see the answer - 3.
Design the core pipeline infrastructure for a new project, with attention to orchestration, data quality, idempotency, and future scale.
Solve and see the answer - 4.
Compare batch and stream processing across latency, complexity, cost, and data quality in a modern analytics pipeline.
Solve and see the answer - 5.
Practical approach for maintaining data quality across ML ETL pipelines, orchestration, and repeatable data processing.
Solve and see the answer - 6.
Approach for safely backfilling missing data while preserving correctness, idempotency, and data quality.
Solve and see the answer - 7.
Compare batch and streaming data processing, including when each fits best in a pipeline.
Solve and see the answer - 8.
Approach for handling missing data in an ML data pipeline, including validation, imputation, and safe downstream consumption.
Solve and see the answer
Software architecture questions
Service design, scaling and reliability questions.
- 9.
Tests conflict resolution and influence when a stakeholder challenges an architectural decision with meaningful business or technical stakes.
Practice this questionShow example answer
Approach
Competency Tested
conflict resolution
Green Flags
- Names a specific architectural disagreement with clear stakes such as latency, reliability, cost, migration risk, or team ownership
- Shows they first sought to understand the stakeholder's concerns before advocating their own position
- Uses structured decision-making such as a design doc, proof of concept, metrics comparison, or explicit trade-off framework
- Demonstrates self-update by changing or refining the proposal based on evidence
- Balances technical correctness with relationship management and long-term trust
- Closes with a concrete outcome and quantified impact after the decision was implemented
Red Flags
- Gives a generic answer about 'aligning stakeholders' without naming a specific architecture decision, stakeholder, or timeline
- Frames the stakeholder as irrational or political without showing curiosity about their underlying concerns
- Describes only opinion-based persuasion and no concrete trade-off analysis, prototype, or data
- Escalates immediately to leadership instead of attempting direct resolution first
- Presents the outcome as simply 'they agreed with me' with no implementation result or measurable impact
- Shows no willingness to update the proposal after learning new information
Rubric
Level What it looks like Strong (Hire) Describes a specific architecture conflict with meaningful stakes and timeline. Seeks to understand the stakeholder first, uses evidence to compare options, updates their own view when warranted, and drives a constructive decision. Outcome is implemented and quantified. Includes a clear lesson learned. Mixed (Lean Hire) Gives a real example with some stakes, but the resolution is only partially data-driven or the result is not well quantified. May show good communication but limited ownership of the final decision or limited self-reflection. Weak (No Hire) Generic or hypothetical answer, little evidence of direct conflict resolution, treats disagreement as winning an argument, or lacks a concrete result. No sign of self-update, stakeholder empathy, or commitment to the final decision. Strong No-Hire Signal Blames the stakeholder, bypasses them without trying to resolve directly, or cannot explain the trade-offs behind the architecture decision. No measurable outcome and no lesson learned. Solution
Applying STAR to This Question
Situation: Pick a real architectural decision with clear stakes: for example, online vs batch inference, Vertex AI vs a custom serving path on GKE, or whether to centralize features in a feature store. Name who disagreed with you and why their opinion mattered. Include the business context, timeline, and why the decision was hard to reverse.
Task: Frame your responsibility carefully. Your job was not just to defend your design; it was to help the team reach the best decision while preserving trust and delivery momentum. Make clear whether you were the technical lead, a peer without formal authority, or the owner of the migration.
Action: This should be the longest section. Show how you first understood the stakeholder's concerns, then translated the disagreement into concrete trade-offs such as latency, reliability, cost, compliance, developer velocity, or migration risk. Strong answers include artifacts like a design doc, decision matrix, prototype, or measured comparison. Also mention whether you updated your own view based on new information.
Result: State what decision was made, whether your proposal changed, and what happened after implementation. Quantify outcomes where possible: latency reduction, lower serving cost, faster model deployment, fewer incidents, or improved developer productivity. End with one lesson you carried forward about handling disagreement on architecture.
Situation
In my last role, I was leading the platform design for a new internal ML inference service that would support about 40 models across fraud, ranking, and forecasting use cases. The existing pattern was fragmented: some teams deployed models on GKE, others used ad hoc batch jobs, and onboarding a new model took roughly three weeks. I proposed standardizing on Vertex AI endpoints for online serving and using a shared feature pipeline with clear contracts.
A key stakeholder, the engineering manager for our highest-traffic product area, strongly disagreed. His team handled nearly 30% of company traffic, and he believed Vertex AI would increase latency and reduce control compared with a custom serving stack on GKE. Because his team was the largest expected adopter, his support was critical. We had six weeks to finalize the architecture before the next planning cycle, so this disagreement could have delayed the entire platform roadmap.
Task
My task was to drive the architecture decision to closure without turning it into a political standoff. I needed to understand his concerns, test the assumptions behind both options, and help the group make a decision we could execute on. Just as importantly, I needed to preserve trust because his team would be one of our closest long-term partners.
Action
First, I set up a 1:1 instead of debating in a large design review. I wanted to understand whether his objections were technical, operational, or organizational. In that conversation, I learned his team had been burned by a previous platform migration that increased p99 latency by 18% and left them dependent on another team for incident response. That changed how I approached the problem: this was not just a preference for GKE; it was a trust and ownership issue.
Next, I rewrote the design discussion around measurable trade-offs. I created a short decision doc comparing Vertex AI and a custom GKE-based serving path across p50/p99 latency, autoscaling behavior, on-call burden, rollout safety, cost per 1,000 predictions, and time to onboard a new model. I partnered with one engineer from his team and one from mine to run a two-week proof of concept using the same model and traffic pattern on both options.
The data was useful and also forced me to update my own position. Vertex AI was better on deployment simplicity and reduced our expected operational overhead by about 35%, but the custom GKE path performed better on one low-latency use case, with p99 about 22 milliseconds faster. Rather than defend my original proposal unchanged, I proposed a hybrid decision: Vertex AI would be the default platform for most online inference workloads, while the most latency-sensitive path could remain on GKE behind a common interface and shared observability standards.
I then brought the conversation back to the broader stakeholder group with the evidence, not just my opinion. I explicitly summarized the other manager's concerns, showed where they were valid, and documented the conditions under which each serving path should be used. To address his ownership concern, I also committed to an SRE-style support model with clear runbooks, shared dashboards, and a 90-day joint on-call transition instead of asking his team to hand over responsibility immediately.
Result
We aligned on the hybrid architecture within the planning window and avoided delaying the platform launch. Over the next two quarters, 31 of 40 models onboarded to the default Vertex AI path, cutting average model deployment time from three weeks to five days. Platform-related inference incidents dropped from 7 in the prior quarter to 2, and we reduced estimated serving operations effort by about 1.5 engineer-months per quarter. The latency-sensitive service stayed on GKE initially, then migrated six months later after additional tuning.
The biggest lesson for me was that architectural disagreement is often a proxy for a deeper concern like trust, ownership, or prior operational pain. Since then, I start by surfacing the stakeholder's underlying risk model before I try to persuade them. That makes the discussion faster, less defensive, and usually leads to a better design than the one I started with.
Anti-Patterns
- Turning the disagreement into a public debate in a large review before understanding the stakeholder's concerns privately
- Arguing from architectural purity instead of business and operational trade-offs
- Treating the design doc as a one-way persuasion artifact rather than a tool for shared decision-making
- Escalating to a director to force a decision without first trying evidence-based alignment
- Refusing to support the final architecture once the group makes a different decision
Follow-Up Questions
- What specifically did the stakeholder disagree with, and how did you validate whether their concern was real?
- If the final decision had gone against your recommendation, how would you have supported it?
- How did you prevent the disagreement from slowing down the broader team?
- What did you change in your communication style once you understood the stakeholder's real concern?
- Looking back, what would you do differently the next time you face architectural pushback?
- 10.
Tests technical ownership and communication through a concrete architecture decision, with emphasis on trade-offs, judgment, and lessons learned.
Solve and see the answer - 11.
Tests ownership and technical judgment through a self-driven project, with emphasis on architecture decisions, prioritization, and communication.
Solve and see the answer - 12.
Design a scalable state-management approach with clear ownership, predictable data flow, testable boundaries, and justified architectural trade-offs.
Solve and see the answer - 13.
Assesses practical experience selecting, implementing, and testing design patterns that improve maintainability without adding unnecessary complexity.
Solve and see the answer - 14.
Tests ownership in evolving an existing system, plus influence, prioritization, and communication under delivery pressure.
Solve and see the answer
Frequently asked questions
How do I structure a system design interview answer?
Clarify requirements and scale, sketch a high-level design, go deep on the one or two hardest components, then discuss bottlenecks, failure modes and tradeoffs. Keep checking in with the interviewer.
What system design questions do data engineers get?
Designing a batch or streaming pipeline, a data warehouse model, an event tracking system or a metrics platform, with questions about late data, backfills and data quality.
What is an ML system design interview?
A design round focused on a machine learning product such as recommendations or fraud detection. You cover data, features, model, training, serving, evaluation and monitoring.
How long should I spend preparing for system design?
Plan for several weeks of practice. Work through a handful of common designs out loud, timing yourself to 45 minutes, until the structure becomes routine.