HLDArena
HLD-243·Messaging & Queues
Medium · 1,000 pts

Change Data Capture (CDC) & Transactional Outbox Relay

Design a Debezium-style WAL log tailing and transactional outbox relay pipeline that captures committed database row mutations in strict per-key order and delivers schema-validated events to downstream consumers.

Max p99
≤ 58 ms
Availability
≥ 99.6%
Budget
≤ $6,650

Functional Requirements

  • FR-1POST /v1/cdc/connectors/{source_id}/wal-batch — Ingests ordered WAL/outbox commit batches with LSN checkpoint tracking.
  • FR-2GET /v1/cdc/streams/{table_shard}/events — Serves ordered change events with schema version metadata to downstream consumer groups.
  • FR-3POST /v1/cdc/connectors/{source_id}/rewind — Resets consumer offset or triggers non-blocking snapshot backfill for a shard.
  • FR-4Must guarantee at-least-once ordered delivery per primary_key without losing committed LSN checkpoints on node crash.

Workload Profile

Steady OLTP Replication26,000 Consumer Poll Read RPS / 9,500 WAL Mutation Write RPS
Bulk Migration & Backfill Burst68,000 Consumer Read RPS / 24,000 WAL Write RPS
Active Working Set26 GB hot WAL ring buffers, LSN offsets & schema registry cache
Ordering InvariantStrict per-entity LSN ordering + idempotent consumer deduplication

Consistency Model

Read-after-write durability on committed LSN offset checkpoints and monotonic per-key change sequence numbers.

Relevant practice for

Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.

Design Write-up

Write under ### Architecture for Diagram to take that up directly

Compulsory section · if not written yet, Diagram reads from the start of your write-up.
Architecture: required·FRs mentioned: 0/4·0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 116 ms
• Availability: ≥ 99.6%
Valid end-to-end Client → Compute → Storage topology