DataEngPrep.tech
QuestionsPracticeAI CoachDashboardPacksBlog
ProLogin
Home/Questions/System Design/Architecture/How do you handle pipeline failures or delays?

How do you handle pipeline failures or delays?

System Design/Architecturemedium2.1 min readPremium

**Section 1 — The Context (The 'Why')** Pipeline failures and delays create cascading business impact: stale dashboards, missed SLAs, and downstream jobs blocked on unavailable data. A naive design—no retries, opaque dependencies, or manual runbooks—forces firefighting instead...

🤖 Analyze Your Answer
Frequency
Low
Asked at 1 company
Category
179
questions in System Design/Architecture
Difficulty Split
15E|6M|158H
in this category
Total Bank
1,863
across 7 categories
Asked at these companies
Moonfare
Key Concepts Tested
airflowwindow

Why This Question Matters

This medium-level System Design/Architecture question appears frequently in data engineering interviews at companies like Moonfare. While less common, it tests deeper understanding that distinguishes strong candidates. Mastering the underlying concepts (airflow, window) will help you answer variations of this question confidently.

How to Approach This

Break this problem into components. Identify the core trade-offs involved, then walk the interviewer through your reasoning step by step. Demonstrate awareness of edge cases and production considerations - this is what separates good answers from great ones. The expert answer includes a code example that demonstrates the implementation pattern.

Expert Answer
422 wordsIncludes code

Section 1 — The Context (The 'Why')
Pipeline failures and delays create cascading business impact: stale dashboards, missed SLAs, and downstream jobs blocked on unavailable data. A naive design—no retries, opaque dependencies, or manual runbooks—forces firefighting instead of self-healing. At Moonfare scale, fund data pipelines have strict regulatory windows; delays breach compliance. Failure modes include task-level OOMs, upstream source delays, and orchestrator outages that prevent new runs while in-flight jobs may complete. The key challenge: distinguish transient failures (retry) from permanent ones (alert, fix).

Section 2 — The Diagram

[DAG]---->[Task A]---->[Task B]---->[Task C]
| | | |
v v v v
[Retry] [Sensor] [Checkpoint] [Alert]
| | | |
+-----------+------------+----->[Runbook|Slack]

Section 3 — Component Logic
The DAG defines task dependencies; Task A/B/C execute in order. Retry policy (e.g., 3 attempts with exponential backoff) handles transient failures; idempotent tasks ensure retries are safe. Sensors wait for upstream data (file arrival, DB watermark) before proceeding; they prevent wasted runs on missing inputs. Checkpointing before commit ensures exactly-once semantics—tasks commit only after success; on failure, replay from last checkpoint. Alerts fire on final failure or SLA breach; they link to runbooks for automated or guided recovery. Dependency-aware scheduling allows skipping optional downstream when critical path fails. Orchestrator down: in-flight runs complete; no new triggers until recovery. Use task pools to limit concurrency and avoid resource exhaustion; set execution timeouts to fail fast on stuck tasks. Implement SLA monitoring with alert-before-breach to enable proactive intervention.

Section 4 — The Trade-offs (The 'Senior' part)

  • CAP Theorem: Consistency during recovery—checkpoint before commit; retries preserve order. Availability via dependency-aware scheduling; skip optional downstream to unblock critical path.
  • Cost vs. Performance: Airflow Cloud Composer ~$300+/mo baseline. PagerDuty ~$20/user. Idle pipeline cost: right-size workers; spot for batch. SLA breach: quantify business impact for prioritization.
  • Blast Radius: Task B fails: C+ blocked; auto-retry 3x then alert. Orchestrator down: in-flight runs complete; no new DAG triggers. Source delay: sensors wait; SLA alert if overdue. Use task-level timeouts to avoid hung runs; set pool limits to prevent resource exhaustion.
  • Design principles: Make every task idempotent; design for rerun from any step. Use deterministic scheduling (e.g., run date as parameter) so reruns produce same outputs. Link each alert to a runbook; automate the most common recovery steps. Test failure scenarios in staging. Define clear ownership for each pipeline; establish escalation paths for SLA breaches.

    Section 5 — Pro-Tip

  • Pro-Move: Runbooks linked to alerts; automate recovery where possible; version config.

  • Red Flag: No dependency graph—cascading failures with no visibility.
  • This answer is partially locked

    Unlock the full expert answer with code examples and trade-offs

    Recommended

    Start AI Mock Interview

    Practice real interviews with AI feedback, track progress, and get interview-ready faster.

    • Unlimited AI mock interviews
    • Instant feedback & scoring
    • Full answers to 1,800+ questions
    • Resume analyzer & SQL playground
    Create Free Account

    Pro starts at $24/mo - cancel anytime

    Just need answers for quick revision?

    Download curated PDF interview packs

    Interview Packs
    1,800+ real interview questions sourced from 5 top companies
    AmazonGoogleDatabricksSnowflakeMeta
    This answer is in the DE Mastery Vault 2026
    1,863 questions with expert answers across 7 categories →

    Free: Top 20 SQL Interview Questions (PDF)

    Get the most asked SQL questions with expert answers. Instant download.

    No spam. Unsubscribe anytime.

    Related System Design/Architecture Questions

    hardWhat architecture are you following in your current project, and why?FreeeasyCDC During Migration - explain approaches for real-time Change Data CaptureFreehardBriefly explain the architecture of Kafka.FreehardDescribe the data pipeline architecture you've worked with.FreehardExplain the trade-offs between batch and real-time data processing. Provide examples of when each is appropriate.Free

    Want to know if YOUR answer is good enough?

    Paste your answer and get instant AI feedback with a FAANG-level improved version.

    Analyze My Answer — Free

    According to DataEngPrep.tech, this is one of the most frequently asked System Design/Architecture interview questions, reported at 1 company. DataEngPrep.tech maintains a curated database of 1,863+ real data engineering interview questions across 7 categories, verified by industry professionals.

    ← Back to all questionsMore System Design/Architecture questions →