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.

MediumTechnical
33 practiced

Compare two-phase commit (2PC) and the saga pattern as approaches to coordinating a transaction that spans multiple services. Explain how each handles atomicity, availability, and isolation, and describe the kinds of business workflows where sagas are preferred over 2PC (and vice versa).

MediumTechnical
37 practiced

Describe how you would design retries and backoff for calls to an external service in the middle of a multi-step distributed transaction (for example, a payment gateway call inside a checkout flow). How do you decide what's safe to retry, classify a failure as transient versus permanent, and handle partial progress if the step can't be completed?

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
33 practiced

An enterprise needs eventual consistency between service A and service B using events. Design an idempotent event processing and reconciliation strategy that guarantees convergence and supports replays, while preserving ordering where necessary.

EasyTechnical
28 practiced

Explain the two-phase commit (2PC) protocol in detail: the coordinator and participant roles, the prepare and commit phases, and how durable logs are used to survive a crash. Enumerate the key failure modes (coordinator crash, participant crash, network partition) and describe the typical participant responses to each.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.