Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Your company's main transactional database is approaching the limits of vertical scaling. Options on the table are application-level sharding, a distributed SQL database, or splitting the data by domain into separate databases. How would you make this decision for a horizon of five years or more?

I would start from growth projections and access patterns, and price each option in engineering time, licences and operations over the whole five years, not just the build. Domain splits reduce coupling but need clear service boundaries and cross-domain consistency; application sharding gives control but spreads complexity into every team for years; distributed SQL moves complexity to a vendor or platform and must be checked for latency, SQL compatibility, maturity and lock-in. I would prefer reversible steps, prototype with real workloads, and record the decision with owners and review points.

Why this question is asked

A decision about the main transactional database is one of the most expensive an engineering organisation makes, because its consequences outlive the people who make it. Each of the three options can work, and each has failed badly at companies that chose it for the wrong reasons. Interviewers ask this at the principal or director level to see how we structure a decision under uncertainty, involve the right people and keep it reversible where we can. In this answer, we will start from the data we need, look at what each option really costs over five years, prototype before committing, and see how to make the decision explicit and revisit it.

1Start From the Workload, Not the Technology

Before comparing options, we need numbers. How fast are data size, write rate and read rate growing, and how sure are we? Which tables carry the load, and which queries and transactions touch several of them? A database that grows 40 percent a year at 8,000 writes per second today will reach about 43,000 writes per second in five years, which no single PostgreSQL primary may handle; if growth is 15 percent, it reaches about 16,000, which a larger instance plus tuning might.

We also map the access patterns. If most transactions stay inside one customer or tenant, sharding by that key is natural. If the load is dominated by a few domains, such as orders and inventory, that rarely join with others, a domain split may relieve the pressure on its own. And sometimes this analysis shows that vertical scaling is not actually at its limit: partitioning, archiving old data, removing analytical queries and fixing a handful of heavy queries can buy two or three years, which changes the urgency of everything else.

2What Each Option Really Costs

Splitting by domain means giving orders, billing and catalogue their own databases, owned by the services in that domain. It reduces coupling and lets each database scale and evolve on its own. The cost is that cross-domain joins and transactions disappear, so we need clear service boundaries, events or APIs between domains, and patterns like sagas for consistency. It only helps if the load really divides along domain lines.

Application-level sharding keeps PostgreSQL but splits the large tables by a key across many databases. It gives full control and familiar tools, but the complexity spreads into every service and team: routing, scatter-gather queries, no cross-shard transactions, global ids, resharding tooling, and on-call knowledge for dozens of databases, for as long as the system exists.

Distributed SQL, such as CockroachDB, YugabyteDB, Spanner or Citus, offers one logical database that shards and replicates itself. It moves much of the complexity to a vendor or platform team. What we must check is the price of that: higher latency for some transactions because of consensus between nodes, gaps in SQL and PostgreSQL compatibility, how mature the operations tooling is, licence cost at our scale, and how hard it would be to leave.

Five-year view of the options
OptionWhere complexity livesMain risk
Domain splitservice boundaries, cross-domain eventsload does not divide by domain
Application shardingevery service and team, permanentlyyears of routing and resharding work
Distributed SQLvendor or platform teamlatency, compatibility, lock-in, licence cost
Scale up and tune firsta few targeted fixesonly buys time, may delay the real decision
Each option moves complexity somewhere; the question is where we can best afford it.

3Prefer Reversible Steps

The options are not exclusive. A domain split is often a good first step, because it is useful whatever we do next: once orders have their own database, we can shard just that database or move it to distributed SQL, and the rest of the system is unaffected. Introducing a data access layer that hides where data lives is similar: it costs little and keeps every later option open.

So I would separate the decision into a reversible near-term part and a harder long-term part. The near-term part, such as tuning, splitting off the busiest domain and adding the routing layer, starts now. The long-term part, sharding or distributed SQL for the largest domain, is decided with evidence from the next step.

4Prototype With Real Workloads

Vendor benchmarks and conference talks do not tell us how our transactions behave. For the serious candidates, we run a prototype with a copy of real data at realistic size and a replay or synthetic version of our real traffic, including the ugly parts such as large batch jobs and the busiest tenant. We measure p99 latency of the key transactions, behaviour during node failure, the effort of schema changes, and how many code changes the services needed. A few weeks of this usually rules out at least one option clearly.

Step throughMaking the decision
  1. Measure growth and access patternsdata size, writes, cross-table transactions
  2. Tuning buys three or more years?
    YesTune now, review yearlyNoShortlist options
  3. Take reversible steps nowrouting layer, split the busiest domain
  4. Prototype the shortlistreal data, real traffic, failure tests
  5. Write the decision recordowners, costs, review points

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

5Make the Decision Explicit

A decision of this size needs a written record: the problem, the numbers, the options considered, why we chose one, what we expect it to cost, and what would make us change course. It names an owner for the decision and owners for the work, because a database strategy without a funded team becomes another half-finished migration. It also sets review points, such as every six months or when write growth deviates from the projection by more than a set margin.

The record also protects the organisation from rediscovering the same debate every year, and it gives new engineers the reasoning, not just the outcome.

6Follow-up questions

How do you involve product and finance in a database decision?

By translating it into their terms: the cost of each option over five years, the engineering time it takes away from features, and the risk to availability and delivery dates. They do not need to choose the technology, but they should agree on the trade-off between cost, speed and risk.

What would make you choose distributed SQL over sharding?

Many transactions that cross what would be shard boundaries, a small platform team that cannot run dozens of databases, and a prototype showing acceptable latency and compatibility at our scale. If transactions stay within a tenant and we have strong database operations skills, sharding may be cheaper in the long run.

How do you avoid analysis paralysis?

By starting the reversible steps immediately and time-boxing the prototype phase. The analysis is there to choose the irreversible part well, not to delay everything.

7Conclusion

In this answer, we saw that the decision starts from growth projections and access patterns, that each option moves complexity to a different place, domain boundaries, every service, or a vendor or platform, with its own long-term costs, and that reversible steps such as a routing layer and splitting the busiest domain can start immediately. Prototypes with real workloads narrow the choice, and a written decision record with owners and review points keeps it honest over five years.

What to say in the interviewAbout 80 seconds aloud

Open with

I would start with numbers rather than technologies: growth projections for data size and write rate, the access patterns of the heaviest tables, and how many transactions cross tables or tenants.

Then, if they want more

Sometimes that shows tuning, partitioning and moving analytics off the database buys years, and that changes the urgency. Then I would compare the three options by where they put the complexity and what that costs over five years. A domain split reduces coupling but needs real service boundaries and cross-domain consistency, and only helps if load divides by domain.

Application sharding gives control with familiar PostgreSQL but spreads routing, scatter-gather, global ids and resharding into every team permanently. Distributed SQL moves that complexity to a vendor or platform, so I would check latency for our key transactions, compatibility, operational maturity, licence cost and how hard it would be to leave.

I would take reversible steps now, like a data access layer and splitting off the busiest domain, because they help whatever we choose. Then I would prototype the shortlist with real data and traffic, including failures, and write a decision record with owners, expected costs and review points, so we revisit it when reality differs from the plan.

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.
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 "Your company's main transactional database is approaching the limits of vertical...": https://scrivio-interview-library.netlify.app/databases/database-scaling/e08d1df265/