| Two-Phase Commit | A coordinator asks every participant to prepare, then to commit: atomic across services, but blocking, slow, and fragile when the coordinator dies between the two phases — which turns a business flow into an operational incident. | deliberately not used across a service boundary — 0 distributed transactions (Q35) |
| Three-Phase Commit | A non-blocking variant of two-phase commit that adds a pre-commit phase to close the coordinator’s blocking window; it still requires every participant to be alive and synchronous. | deliberately not used known and rejected along with 2PC |
| Compensating Transaction | An action that semantically undoes a completed step — a refund, a release, a cancellation — rather than rolling back a transaction, which is why the undo is business logic and has to be designed at the same time as the step it undoes. | inside a named pattern one per saga step, designed alongside it (Q35) |
| Try–Confirm–Cancel (TCC) | Three explicit phases: reserve the resource, confirm it, or cancel the reservation — for the cases where a resource can genuinely be held, such as stock or credit, and the split is acceptable to the business. | in production the shape of reservation-style steps where inventory has to be held rather than compensated |
| Delivery Guarantees (at-most-once, at-least-once) | At-most-once may lose a message and at-least-once may duplicate it; neither is a business guarantee, which is why the guarantee is manufactured at the effect with a dedup key rather than negotiated with the transport. | in production at-least-once transport with idempotent effects, stated as the default (Q34) |
| Exactly-Once Effects | Not a delivery guarantee but a property of the effect: an operation that is applied exactly once because the duplicates are recognised, with the database as the arbiter rather than the application’s timing. | in production the target everywhere; implemented with a unique constraint and a conditional write |
| Optimistic Concurrency Control | A writer declares the version it read and the store rejects the write if anything changed in the meantime, so that a conflict becomes a visible result instead of a silently lost update. | in production aggregate version on every append, row version or ETag on editable records |
| Pessimistic Locking | Holding a lock or a database row for the duration of the work: simple and correct, and it does not survive a slow participant, a lost connection or a process that never comes back. | in production used inside a single transaction only — the lock is never held across a network call |
| Distributed Lock and Lease | A lock in a shared store with a lease or expiry so that a crashed holder eventually releases it — and a fencing token, because a holder that has been paused can come back and write after it has lost the right to. | outside these systems used in its bounded form: a short lease on scheduled jobs so only one instance runs the batch |
| Leader Election | Participants agree on one active owner of a responsibility, which is how a scheduled job, a relay or a partition ends up with a single writer instead of several. | platform-provided broker partition assignment and the orchestration layer elect, not the application |
| Consensus (Paxos, Raft) | A cluster agreeing on a single order of operations even while members fail, which is what makes a replicated log and a stable leader possible in the first place. | platform-provided relied on, not implemented — Raft inside the coordination layer and the broker’s controller |
| Quorum Reads and Writes (R + W > N) | Reading and writing overlapping majorities so that a read always sees the latest write, at the cost of extra latency and of availability when the network partitions. | platform-provided a property of the replicated stores in use, not a per-query choice made here |
| CAP and PACELC | Under a partition you choose consistency or availability; PACELC adds that even without one you are still trading latency against consistency. It is useful as a way to state a decision in writing rather than as a design in itself. | in production used as the framing written into the ADR that rejects 2PC (Q35) |
| Eventual Consistency | Replicas and projections converge once the writes stop, which is the normal state of a read model; the engineering is in bounding how long that window is and being honest about it in the interface. | in production every projection, with lag measured rather than assumed (Q36) |
| Read-Your-Writes and Monotonic Reads | The two consistency guarantees a user actually notices: after your own write you must see it, and time must not appear to run backwards on your next read. Implemented by routing the writer’s reads to the primary, or by carrying a version token. | in production the write path returns the version that the read path hands back |
| Logical Clocks (Lamport, vector, hybrid) | Ordering without a shared clock: Lamport timestamps give a total order consistent with causality, vector clocks detect writes that were concurrent, and hybrid logical clocks keep physical and logical time together across services. | inside a named pattern the reason every event carries a version and a correlation id; a full vector clock has not been needed |
| Conflict-Free Replicated Data Type (CRDT) | Data structures whose merge is commutative, so replicas converge with no coordination at all — at the price of giving up any invariant that needs a global view of the data. | deliberately not used the invariants in these domains need one arbiter, which is what the unique constraint is for |
| Conflict Resolution Policy | A written rule for the same record written twice: version check and retry, last-write-wins with a clock, or a merge function. The wrong answer is “whichever arrives last”, which is a race with no owner and no record. | in production version check plus reject-and-retry; never last-write-wins |
| Write-Ahead Log and Durability | Durability as a design element rather than an assumption: the log, the flush policy, and exactly what a commit does and does not guarantee — the ground that both the outbox and the event log stand on. | in production commit durability and replication settings chosen deliberately |
| MVCC and Isolation Levels | How the store actually isolates concurrent work: snapshot isolation lets readers proceed without blocking writers, while locking serialises them — and a long transaction turns either one into a production incident. | in production the isolation level is chosen per use case (Q36) |