Quick revision
The short answer
We design for change by drawing boundaries around business capabilities and data ownership, which change more slowly than technology, and by putting versioned contracts with compatibility rules between components. We protect key properties with fitness functions in CI, make change incremental by default with strangler routing, feature flags and expand-and-contract schema changes, hide vendor and framework choices behind narrow interfaces only where replacement is realistic, and review key decisions against the current context on a schedule, recording changes as ADRs.
What to remember
In this answer, we saw how to design a system that can change for five years without big rewrites: boundaries around business capabilities and data ownership, versioned contracts with compatibility rules, fitness functions in CI, incremental change through strangler routing, feature flags and expand-and-contract migrations, abstraction only where replacement is realistic, and scheduled reviews of key decisions recorded as ADRs.
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.
We design for change by drawing boundaries around business capabilities and data ownership, which change more slowly than technology, and by putting versioned contracts with compatibility rules between components. We protect key properties with fitness functions in CI, make change incremental by default with strangler routing, feature flags and expand-and-contract schema changes, hide vendor and framework choices behind narrow interfaces only where replacement is realistic, and review key decisions against the current context on a schedule, recording changes as ADRs.
Why this question is asked
Big rewrites happen when a system's structure no longer fits the business and every change has become too risky to make in small steps. No one can predict five years of requirements, so the goal is not a perfect upfront design but a system that keeps the cost of change low as requirements shift. Interviewers ask this design question to see whether we know the specific techniques that make architecture evolvable, and the judgement to avoid overengineering. In this answer, we will look at choosing stable boundaries, versioned contracts, fitness functions, incremental change techniques, where abstraction pays off, and how to keep decisions current.
1Drawing Boundaries Around Business Capabilities
The first decision is where to split the system. Technology layers, such as a 'database service' or a 'UI layer', make poor top-level boundaries, because every business change cuts through all of them. Business capabilities, such as ordering, payments, pricing, fulfilment and customer accounts, change much more slowly: an online shop will still take orders and payments in five years, even if every technology underneath changes. Each capability owns its data, and no other component reads its tables directly.
Notice why data ownership matters so much. When two components share tables, neither can change its schema without the other, and the shared database becomes the real coupling. Clear ownership means each component can change its storage, or even its database engine, without coordinating with others. These boundaries can be modules inside a modular monolith or separate services; the principle is the same.
- Business capabilitiesorders, payments, pricing; change slowly
- Versioned contractsAPIs and event schemas with compatibility rules
- Component internalseach owns its data and design
- Frameworks and vendorsbehind narrow interfaces where replacement is realistic
- Fitness functions in CIprotect dependency rules, latency, security
5 layers, from the top down. Step through them one at a time.
The upper layers should be the hardest to change; the lower ones the easiest.
2Versioned Contracts Between Components
Components talk through contracts: HTTP APIs described with OpenAPI, and event schemas, for example in Avro or JSON Schema with a schema registry. Each contract has compatibility rules. The usual rule for evolution is that changes must be backward compatible: adding an optional field is fine, removing or renaming one is not. A schema registry can enforce this automatically, rejecting an incompatible event schema at build or publish time.
When a breaking change is truly needed, we version the contract: publish v2 alongside v1, migrate consumers, and retire v1 after a published deprecation period. The reason this matters for long-term change is independence: the payments team can redesign its internals and release daily, as long as its contract holds, without waiting for every consumer.
3Protecting Key Properties With Fitness Functions
Over five years, hundreds of people will change the system. Rules that exist only in documents will erode. So the properties we care about become automated checks in CI, called fitness functions: ArchUnit or Spring Modulith tests for dependency rules between modules, contract tests that verify a provider still satisfies its consumers, latency budgets in load tests, and dependency scans that fail on critical vulnerabilities. When a change would break a property, the build fails and the team discusses it in review, while it is still cheap to fix.
4Making Change Incremental by Default
Rewrites become necessary when the only way to change something is all at once. So we build the habits and tools for small steps into the system. The strangler pattern replaces an old component gradually: a router or gateway sends some requests to the new implementation and the rest to the old one, and the share grows until the old one can be removed. Feature flags let us deploy new code dark and enable it for a percentage of users. And database changes use expand and contract: first add the new column or table (expand), make the code write to both and read from the new one, migrate the data, and only then remove the old structure (contract).
- Put a router in front of the old component
- Build the new implementation for one capability
- Route a small share of traffic to itbehind a flag, compare results
- Results match and metrics healthy?YesIncrease the shareNoRoute back, fix, retry
- All traffic on the new oneremove the old code and data
5 steps in order. Play them, or step through them one at a time.
Notice that every step is deployable and reversible on its own. That is the property that prevents big-bang rewrites: each change is small enough to roll back.
5Hiding Vendors and Frameworks Only Where It Pays
It is tempting to wrap every library in our own interface 'in case we change it'. That is usually a mistake: wrappers cost code, hide useful features and slow every change, and most of them are never used to swap anything. We hide a choice behind a narrow interface only where replacement is a realistic possibility and the dependency is spread widely. Payment providers, email and SMS vendors, search engines and cloud-specific storage are typical examples: there are several real alternatives and commercial reasons to switch.
For the framework itself, Spring in our case, wrapping is rarely worth it. Instead, we keep business logic in plain classes that do not depend heavily on framework details, which makes upgrades such as Spring Boot 3 to 4 easier without an abstraction layer.
6Reviewing Decisions Against the Current Context
Every architecture rests on assumptions: expected traffic, team structure, regulatory needs, the business model. Over five years, some of them will become false. So we keep the significant decisions as ADRs with their context, and review the key ones on a schedule, say once a year, or when a trigger occurs, such as entering a new market or doubling the number of teams. If a decision no longer fits, we write a new ADR, mark the old one superseded and plan the change incrementally, using the same techniques. That habit is what turns architecture from a one-time design into something that evolves deliberately.
7Follow-up questions
Is this an argument for microservices?
No. All of these techniques work inside a modular monolith too: capability modules owning their data, versioned internal APIs and events, fitness functions and expand-and-contract migrations. Microservices add independent deployment and scaling, at a cost; they are one possible outcome of good boundaries, not a requirement.
How do you find business capability boundaries?
By working with domain experts: event storming workshops, looking at which teams own which processes, which data changes together, and where language differs, for example 'customer' meaning different things in billing and support. Those differences often mark a boundary.
What is the biggest risk to evolvability?
Shared data. Two components that read and write the same tables cannot change independently, whatever their APIs look like. Clear data ownership, with access only through the owning component's contract, protects evolvability more than any other single choice.
8Conclusion
In this answer, we saw how to design a system that can change for five years without big rewrites: boundaries around business capabilities and data ownership, versioned contracts with compatibility rules, fitness functions in CI, incremental change through strangler routing, feature flags and expand-and-contract migrations, abstraction only where replacement is realistic, and scheduled reviews of key decisions recorded as ADRs.
Open with
I would focus on keeping the cost of change low rather than predicting the future. First, boundaries around business capabilities like orders, payments and pricing, each owning its own data, because the business capabilities change much more slowly than technology, and shared tables are the biggest source of coupling.
Then, if they want more
Between components, versioned contracts: OpenAPI for HTTP and event schemas with compatibility rules, ideally enforced by a schema registry, so adding an optional field is fine and breaking changes become a new version alongside the old one.
Then fitness functions in CI, like ArchUnit or Spring Modulith tests for dependency rules, contract tests and latency budgets, so the architecture cannot drift silently. I would make change incremental by default: the strangler pattern behind a router for replacing components, feature flags, and expand-and-contract for schema changes, so every step is deployable and reversible.
I would only hide vendors behind narrow interfaces where switching is realistic, like payment or messaging providers, and not wrap the whole framework, because speculative abstraction slows change too. And I would review key decisions once a year or when the business changes, record changes as ADRs and supersede old ones.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Spring Boot 3
- 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 "How would you design a large system so that its architecture can change over the next...": https://scrivio-interview-library.netlify.app/architecture/architecture-decisions/4f038f549a/