DataDriven
LearnPracticeInterviewDiscussDailyJobs

An order service handler writes an order to Postgres and publishes order_placed to Kafka in the same

A medium Pipeline Design mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.

Domain
Pipeline Design
Difficulty
medium

Interview Prompt

An order service handler writes an order to Postgres and publishes order_placed to Kafka in the same function. There is no transaction across the two systems. Four outcomes are possible: both succeed, DB-only (silent ghost orders), Kafka-only (phantom events), or both fail (acceptable retry). Two of the four break invariants. A nightly recon job catches drift but enough leaks that notifications fire for orders that never shipped. Distributed transactions (XA, 2PC) do not solve this in modern infra. Spot the dual write by adding four marker nodes off the handler, one per outcome, each named with the invariant that breaks (or that the path is acceptable).

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your pipeline design solution with real code execution
  4. Get instant feedback and a hire/no-hire decision

Related

  • All Mock Interviews
  • Practice Mode (untimed)
  • System Design Interview Questions
  • Data Engineering Interview Prep Guide
  • Practice Problems
  • Daily Challenge