Quick revision
The short answer
The claim is only partly true. A distributed SQL database gives serializable, atomic transactions within that one database, but any service that keeps data in another store or calls an external API still needs sagas and outboxes for those steps. We evaluate it by measuring the latency of cross-region consensus commits on our real write paths, weighing the schema and operational coupling of putting every service in one database, assessing vendor risk, licensing, exit cost and skills, and running a bounded pilot on one domain with clear success criteria before any platform-wide commitment.
What to remember
In this answer, we evaluated the vendor's claim by separating capability from marketing. Distributed SQL gives serializable transactions within one database, but services that call external APIs or keep data in other stores still need sagas, outboxes and idempotency. We measured the latency cost of cross-region consensus at p99 on real write paths, weighed the coupling of putting every service in one database, assessed vendor risk, licensing, exit cost, maturity and skills, and proposed a bounded pilot on one domain with success criteria before any wider commitment.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
The claim is only partly true. A distributed SQL database gives serializable, atomic transactions within that one database, but any service that keeps data in another store or calls an external API still needs sagas and outboxes for those steps. We evaluate it by measuring the latency of cross-region consensus commits on our real write paths, weighing the schema and operational coupling of putting every service in one database, assessing vendor risk, licensing, exit cost and skills, and running a bounded pilot on one domain with clear success criteria before any platform-wide commitment.
Why this question is asked
Vendors of distributed SQL databases, systems that spread one logical SQL database over many nodes and regions with consensus replication, make a strong pitch: keep your transactions, drop the complexity of eventual consistency. Some of that is true and valuable. Interviewers ask this at the twenty-year level because the leader's job is to separate the real capability from the marketing, find the hidden costs, and design a decision process that protects the company. In this answer, we will recap what such a database guarantees, test the claim against our actual architecture, look at latency, coupling and vendor risk in turn, and finish with how we would structure a pilot.
1A Quick Recap of What Distributed SQL Offers
A distributed SQL database splits tables into ranges or shards, replicates each one to several nodes, often in different regions, and uses a consensus protocol such as Raft or Paxos so that a majority of replicas agree on every write. On top of that it runs distributed transactions, typically with a form of two-phase commit across the shards a transaction touches, and can offer serializable isolation, the strongest standard level, where transactions behave as if they ran one at a time.
So within that database we get what a single PostgreSQL gives us, atomic and isolated transactions over any rows, while the data is spread across regions and survives the loss of a node or even a region. That is a genuine engineering achievement, and for some workloads it removes real complexity.
2Testing the Claim Against Our Architecture
The claim says the database removes sagas and outboxes across our services. That is only true for transactions whose every step is a write to that same database. We would map our cross-service flows and check each step. An order flow that reserves stock, charges a card through an external payment provider, sends a confirmation email and publishes an event to partners has at least two steps outside any database we control. The payment provider will not join our transaction. Neither will the email service, the partners' systems, or a search index and cache that hold copies of our data.
Those steps still need the patterns we use today: an outbox to publish events reliably after commit, idempotency keys for the external calls, and a saga with compensations when a later step fails. The distributed database can make the internal part of each flow simpler, but it does not make the flow atomic.
| Step in the order flow | Inside the distributed DB? | Still needs |
|---|---|---|
| Create order, reserve stock | yes, if both live there | nothing extra |
| Charge card at the provider | no, external API | idempotency key, saga step |
| Send confirmation email | no | outbox, retry |
| Publish event to partners | no | outbox or CDC |
| Update search index and cache | no | events, eventual consistency |
3The Latency Cost of Consensus
Strong consistency across regions is paid for in round trips. A commit must be acknowledged by a majority of replicas, and if those replicas sit in different regions the commit waits for the network between them. Between US East and US West that is roughly 60 to 70 milliseconds per round trip, and a distributed transaction touching several ranges may need more than one. A write that takes 5 milliseconds on a local PostgreSQL can take 100 milliseconds or more at p99.
Vendors reduce this with locality features, placing a row's leader replicas in the region where it is used, but then cross-region transactions are slower still. So we must measure, not accept a benchmark: replay our real write paths, with our transaction shapes and contention, against a test cluster in our target regions, and look at p99, not the average. Contention matters too: under serializable isolation, conflicting transactions abort and retry, so the application must handle retry errors.
4The Coupling Cost of One Database
Suppose the latency is acceptable. Putting all services into one database, even one that scales horizontally, brings back the coupling we split services to avoid. Teams that can join each other's tables will. A schema change becomes a cross-team negotiation again, a heavy query from one team competes with everyone's transactions, and a database upgrade or incident affects every service at once. Scaling is solved; ownership is not.
If we adopt it, I would still keep one schema or database per service inside the cluster and forbid cross-service queries, which keeps the autonomy but also means cross-service transactions stay off the table, and the original claim no longer applies.
5Vendor Risk, Licensing and Skills
A database is the hardest component to replace, so vendor risk matters more than for any other tool. We would assess the vendor's financial health and roadmap, the licence and how it has changed in the past, since several database vendors have moved from open source to more restrictive licences, the pricing model at our five-year data volume, and the exit cost: how compatible the SQL dialect and wire protocol are, for example PostgreSQL compatibility, and how we would migrate out.
Operational maturity counts as much: backup and point-in-time restore, online schema changes, upgrade process, observability, support response times. And skills: our engineers and DBAs know PostgreSQL deeply; tuning a distributed database, understanding its transaction retries and its data placement, is a new discipline we would have to hire or train for.
6Structuring the Decision: A Bounded Pilot
We would not commit the platform on a vendor's claim. We run a pilot on one domain, ideally one that would genuinely benefit, such as a multi-region user profile or inventory service, with success criteria agreed before it starts: p99 write latency below a set number on real traffic shapes, no data correctness issues under failure tests that kill a node and a region, operating effort within a set number of hours per week, and a cost projection at full scale.
The pilot runs for a fixed period, perhaps three months, with an explicit decision at the end: adopt for that class of workload, extend the pilot, or stop. Whatever the result, the sagas and outboxes at our external boundaries stay, so the decision is about the database, not about removing those patterns.
7Follow-up questions
When is distributed SQL actually the right choice?
When one domain needs strong consistency, high availability across regions and horizontal write scale at the same time, and its transactions stay within that domain's data. Global inventory, account balances served in several regions, or a user identity store are typical. It is a good database for a domain, not a replacement for integration patterns between domains.
How would you explain the result to the executive team?
In terms of outcomes: which risks it reduces, for example regional outages for that domain, what it costs in licence, latency and skills, and what it does not change, the integration patterns at our external boundaries. A one-page summary of the pilot criteria and results lets them see that the decision followed evidence.
What is the biggest risk if we adopt it everywhere?
Rebuilding a shared-database monolith that happens to be distributed, with teams coupled through tables again, plus a single vendor dependency for all our data. Both are expensive to undo.
8Conclusion
In this answer, we evaluated the vendor's claim by separating capability from marketing. Distributed SQL gives serializable transactions within one database, but services that call external APIs or keep data in other stores still need sagas, outboxes and idempotency. We measured the latency cost of cross-region consensus at p99 on real write paths, weighed the coupling of putting every service in one database, assessed vendor risk, licensing, exit cost, maturity and skills, and proposed a bounded pilot on one domain with success criteria before any wider commitment.
Open with
I would take the claim seriously but test it, because it is only partly true. A distributed SQL database gives me serializable, atomic transactions within that one database, which is valuable.
Then, if they want more
But my flows do not live only in one database. An order calls an external payment provider, sends emails, publishes events to partners and updates caches and search indexes. None of those join the transaction, so I still need idempotency keys, outboxes and sagas at those boundaries. Then I would look at three costs.
Latency: cross-region consensus means every commit waits for a majority of replicas, which can turn a 5 millisecond write into 100 milliseconds, so I would measure p99 on our real write paths, including retries under serializable isolation. Coupling: putting all services in one database brings back shared schemas and a shared blast radius, even if it scales.
And vendor risk: licence history and terms, pricing at our volume, exit cost and compatibility, operational maturity like backups and upgrades, and whether our team has the skills.
To decide, I would run a bounded pilot on one domain that really needs multi-region strong consistency, with success criteria agreed up front for latency, correctness under node and region failure, operating effort and cost. Only after that would I consider a wider commitment.
About this answer
- Last updated
- 12 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 documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Cloud documentation, Resilience4j documentation
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 "A vendor proposes a distributed SQL database that offers serializable transactions...": https://scrivio-interview-library.netlify.app/spring-boot/distributed-data/0f21675995/