# Two boundaries on this canvas leak duplicates

Canonical URL: <https://datadriven.io/problems/two-boundaries-on-this-canvas-leak-duplicates-the-applicati-02ef9ae4>

Domain: Pipeline Design · Difficulty: medium

## Problem

Two boundaries on this canvas leak duplicates. The application boundary has no atomicity (the order service writes to Postgres and publishes to Kafka in the same handler, the section's named most common production bug in event-driven systems). The downstream order_analytics destination is plain Postgres without a primary key, so Kafka redelivery double-counts. Pick the section's named building block per boundary; rolling a custom 2PC is forbidden.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/two-boundaries-on-this-canvas-leak-duplicates-the-applicati-02ef9ae4)
- [System Design Interview Questions](https://datadriven.io/data-engineering-system-design)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.