Data Consistency and Distributed Transactions Questions

Maintaining correctness of state across services and replicas: eventual consistency, conflict resolution (last-write-wins, CRDTs, vector clocks), the saga pattern, two-phase commit, and idempotency keys for exactly-once effects. Covers when to trade strict consistency for availability and how to reason about read-your-writes and monotonic guarantees. Focuses on the application/service layer rather than storage-engine internals.

EasyTechnical
32 practiced

For a high-throughput streaming ETL ingesting user events, what metadata would you record to enable efficient deduplication of events within a time window? Explain how fields such as event_id, user_id, event_time, ingestion_time, and partition offsets are used during processing, and the retention implications of keeping that metadata. Then list the common deduplication approaches available (producer-side dedupe, consumer-side dedupe using state, dedupe tables or upserts, watermark/window compaction) and give one advantage and one drawback of each.

HardSystem Design
34 practiced

Design a collaborative real-time document editing service and choose a conflict-resolution strategy. Compare Operational Transformation (OT) and CRDT-based approaches on convergence guarantees, metadata growth, undo/redo complexity, latency of local edits, and support for offline editing at scale, and justify your choice.

MediumTechnical
39 practiced

A dedup store holds per-event idempotency keys to enforce exactly-once for a streaming sink. Propose a safe garbage-collection strategy that reclaims keys without risking re-accepting late-arriving or retried events incorrectly. Include TTL calculation relative to watermarks, watermark alignment across nodes, and mechanisms to coordinate GC in a distributed deployment.

HardTechnical
38 practiced

Explain how distributed deadlocks can arise when multiple 2PC coordinators interact with overlapping resource managers. Propose an approach to detect and resolve this class of deadlock in production.

MediumTechnical
31 practiced

Design a mechanism to provide 'read-your-writes' consistency to end users when reads are served through API proxies, caches, or CDNs. What approaches could you use, and what are the latency, cache-hit-rate, and availability trade-offs between them?

Unlock Full Question Bank

Get access to all Data Consistency and Distributed Transactions interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.