Scrivio Interview library
LeadershipPrincipal7 min read · updated 13 November 2026

A team building a new core order platform proposes a leaderless, Dynamo-style database because it is always writable and never fails over. Another team prefers a leader-based database with consensus-based failover. The platform is expected to run for a decade.

As the senior technical leader, how do you evaluate the two replication models for this system, beyond the always-writable claim?

I would evaluate both models against the order platform's invariants and its ten years of operations, not against availability alone. A leaderless store is always writable and has no failover pauses, but concurrent writes resolve by timestamp or need merge logic, and it has no multi-row transactions or uniqueness without extra mechanisms such as Paxos-based conditional writes. A leader-based store with consensus gives one order of writes, transactions and constraints at the cost of short election pauses and higher cross-zone write latency. For an order core with rules like no double payment and unique order numbers, the transactional core usually belongs in a leader-based or distributed SQL store, while high-volume, easily merged data can go leaderless.

Why this question is asked

Choosing the database for a core platform that must live for a decade is one of the most expensive decisions a senior engineer influences, and both teams in this scenario have a real point. Interviewers ask it to see whether we can move a debate from slogans, always writable versus consistent, to the specific guarantees the business needs, the code that each choice forces us to write, and the people who will run it. In this answer, we will recap what each model promises, test both against the order platform's invariants, compare ten years of operations, and finish with a decision per data class and how to reach it with both teams.

1What Each Model Actually Promises

In a leaderless, Dynamo-style store such as Cassandra, any replica accepts a write, and the client is acknowledged when enough replicas confirm. There is no leader to fail, so there is no failover and no election pause: as long as enough replicas in the local data center are reachable, writes succeed. The price is that there is no single order of writes. Two concurrent updates to the same cell are resolved by timestamp, last write wins, and one silently disappears unless the application uses merge logic. There are no transactions across rows and no unique constraints; the closest tool is a lightweight transaction, a conditional write coordinated by Paxos, which works within one partition and costs several round trips.

In a leader-based store with consensus, such as PostgreSQL with a consensus-managed failover like Patroni, or a distributed SQL database like CockroachDB, Spanner or YugabyteDB that runs Raft or Paxos per range, every write goes through a leader that orders it. We get transactions, unique constraints and read-after-write behaviour. The price is a short window of unavailability when a leader fails and a new one is elected, typically seconds, and higher write latency when the consensus group spans zones, because a majority must confirm each write.

The two models for an order platform
ConcernLeaderless (Dynamo-style)Leader-based with consensus
Write availabilitywritable while enough local replicas livebrief pause during leader election
Concurrent updateslast write wins or custom mergeordered; conflicting transaction retries
Multi-row transactionsnone; single-partition conditional writesyes
Unique constraintsnot built inyes
Write latencylow, local replicasmajority round trip, higher across zones
Typical decade workrepair, tombstones, consistency levelsfailover drills, leader capacity, schema changes
Neither column is better in general; the question is which costs the order domain can afford.

2Testing Both Against the Order Invariants

The useful step is to list the rules the platform must never break and ask each team how their design enforces them. No double payment: a payment for an order must happen at most once, even under retries. Stock limits: we must not sell more units than exist. Unique order numbers: no two orders share a number.

In the leader-based design these are ordinary database features: a unique constraint on the payment's idempotency key, a conditional update on stock inside a transaction, a sequence or unique index for order numbers. In the leaderless design each one needs a mechanism. Uniqueness needs a lightweight transaction, INSERT ... IF NOT EXISTS, which uses Paxos with about four round trips and fails when a quorum is unreachable, so it gives up exactly the availability the design was chosen for. Stock that spans several partitions cannot be protected by a single-partition conditional write at all, so it needs a reservation service or a single owner per item. Notice the pattern: every invariant either becomes a consensus step, losing the always-writable property for that operation, or moves into application code that must be written, reviewed and tested for ten years.

Asking for a costed answer for each invariant, in code, latency and testing, usually makes the discussion concrete within a meeting.

3Ten Years of Operations

A decade-long platform is mostly operations. Leaderless stores need regular anti-entropy repair on every node, attention to tombstones from deletes and expiring data, careful choice of consistency levels per query, and engineers who understand why a read at ONE can return stale data. Mistakes are often silent: lost updates and resurrected deletes do not raise errors. Leader-based stores need tested failover, capacity planning for the write leader or the hottest ranges, and careful online schema changes. Their failures are usually loud: an election pause, a failed transaction that must be retried.

So I would also ask which skills the organisation has today and can keep hiring for. A team with deep relational and SQL experience will run a leader-based store better, and the reverse is true for a team that has run Cassandra at scale for years. The best design on paper loses to the one the organisation can operate at three in the morning.

4Deciding Per Data Class

The two models do not have to compete for the whole platform. Order events, shopping carts, browsing history and telemetry are high-volume, append-heavy or easily merged: a cart can be merged as a set, and an event log never updates. Those fit a leaderless store well and benefit from its write availability. Orders, payments, stock reservations and order numbers carry invariants, and they belong in a leader-based or distributed SQL store, where the database enforces the rules.

The two are linked by ids and by events: the transactional core publishes order events through an outbox, and the high-volume stores consume them. This also limits how much the always-writable property matters, because the parts of the system that most need it, carts and events, get it.

Step throughHow I would run the decision
  1. List the invariants per data classpayments, stock, order numbers, carts, events
  2. Each team costs every invariantcode, latency, tests, failure behaviour
  3. Compare ten-year operationsrepair and tombstones vs failover drills
  4. Prototype the hardest path in bothe.g. reserve stock and pay under failure injection
  5. Does one model fit all classes?
    YesUse one storeNoSplit by data class, link by ids and events
  6. Write the decision recordassumptions, revisit triggers, owners

6 steps in order. Play them, or step through them one at a time.

5Bringing Both Teams to One Decision

As the senior leader, my job is less to pick a winner than to make the decision traceable. I would ask both teams to work from the same list of invariants and failure scenarios, run a short prototype of the hardest path, such as reserving stock and charging under node failure, on both designs, and record the result in an architecture decision record with the assumptions that would make us revisit it, for example an order volume ten times the forecast. Both teams then own the outcome, and in five years someone can see why it was chosen.

6Follow-up questions

Isn't a short election pause unacceptable for orders?

Usually not. An election takes seconds, clients can retry idempotent requests, and a few seconds of write unavailability a year is far cheaper than a double payment or an oversold item. If it truly is unacceptable for some flow, that flow can buffer requests in a queue and process them when the leader returns.

Can a leaderless store be made safe for orders?

Partly, with lightweight transactions per partition, single-writer ownership per order and careful idempotency. But each of these gives up part of the always-writable property or adds code the team must maintain, which is exactly the cost we need to see on paper.

Where does distributed SQL fit?

It is a leader-based model per range with consensus, so it offers transactions and constraints while scaling horizontally across zones and regions. It suits an order core that outgrows one PostgreSQL primary, at the cost of higher write latency than a single-node database.

7Conclusion

In this answer, we saw that always writable is only one property, and that the real comparison is how each model enforces the order platform's invariants and what ten years of operating it cost. Leaderless stores give write availability but leave ordering, uniqueness and multi-row rules to timestamps, single-partition Paxos or application code; leader-based stores with consensus give those rules at the price of election pauses and latency. Deciding per data class, with costed invariants, a prototype and a decision record, usually puts the transactional core in a leader-based or distributed SQL store and high-volume mergeable data in a leaderless one.

What to say in the interviewAbout 100 seconds aloud

Open with

I would move the discussion from always writable to what the order platform must guarantee. A leaderless store really does give write availability and no failover pauses, but concurrent updates resolve by last write wins or custom merge code, and there are no multi-row transactions or unique constraints; the closest tool is a Paxos-based conditional write within one partition, which costs several round trips and fails without a quorum.

Then, if they want more

A leader-based store with consensus gives one order of writes, transactions and constraints, and costs a few seconds of unavailability during elections and higher write latency across zones. Then I would list the invariants: no double payment, no overselling, unique order numbers.

I would ask each team to show exactly how they enforce each one, with the cost in code, latency and tests. In the leaderless design, each invariant either becomes a consensus step, giving up availability for that operation, or becomes application logic we maintain for ten years.

I would also compare operations over a decade, repairs, tombstones and consistency-level discipline against failover drills and leader capacity, and match that to the skills we have. My likely decision is per data class: carts, events and telemetry in the leaderless store, orders, payments and stock in a leader-based or distributed SQL database, linked by ids and outbox events.

I would back it with a prototype of the hardest path on both and a decision record listing the assumptions that would make us revisit it.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "As the senior technical leader, how do you evaluate the two replication models for this...": https://scrivio-interview-library.netlify.app/architecture/partitioning-and-replication/25aae89f3d/