Quick revision
The short answer
For 8 engineers and an uncertain domain, a modular monolith is usually the better start: one deployment, with module boundaries enforced in code by tools such as Spring Modulith or ArchUnit tests. Microservices add network calls, distributed data, separate deployments and observability work, a cost that is high for a small team, and moving a wrong boundary between services is much harder than inside one codebase. We extract a service later when there is a clear scaling, team or release reason, and we write down in advance the criteria that would trigger it.
What to remember
In this answer, we saw that microservices bring network calls, distributed data, many deployments and observability work, which is a heavy cost for 8 engineers. A modular monolith keeps one deployment while enforcing module boundaries with Spring Modulith or ArchUnit, and it makes the frequent boundary changes of an uncertain domain cheap. We extract services later for clear scaling, team, release or isolation reasons, and record those triggers in the decision.
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.
For 8 engineers and an uncertain domain, a modular monolith is usually the better start: one deployment, with module boundaries enforced in code by tools such as Spring Modulith or ArchUnit tests. Microservices add network calls, distributed data, separate deployments and observability work, a cost that is high for a small team, and moving a wrong boundary between services is much harder than inside one codebase. We extract a service later when there is a clear scaling, team or release reason, and we write down in advance the criteria that would trigger it.
Why this question is asked
The monolith versus microservices question is a favourite in design interviews because there is no fashionable correct answer; it tests whether we reason from the team's situation. The two facts in this question, a small team and an uncertain domain, carry most of the weight. In this answer, we will recap what each option means, count the costs microservices bring, see how a modular monolith keeps boundaries without the network, explain why an uncertain domain favours one codebase, and define when and how to extract services later.
1A Quick Recap of the Two Options
A microservices architecture splits the product into independently deployed services, each with its own codebase and usually its own database, talking over the network through HTTP calls or messages. A modular monolith is a single deployable application, one Spring Boot jar for example, whose code is divided into modules with clear boundaries: each module owns its data and exposes a small public interface, and other modules may only use that interface.
Notice that both options aim for the same thing: parts of the system that can change independently. The difference is where the boundary is enforced. In microservices, the network enforces it. In a modular monolith, tests and build rules enforce it.
2What Microservices Cost a Team of 8
Every in-process method call that becomes a network call can now be slow, fail or time out, so we need timeouts, retries and circuit breakers. Data that used to sit in one database with transactions is now spread across services, so a business operation that touches two of them needs sagas, outbox tables or compensating actions. Each service needs its own pipeline, deployment configuration, dashboards, alerts and on-call knowledge. And to debug one request, we need distributed tracing across services.
For a team of 8 split across, say, six services, this overhead lands on very few people. A rough estimate is that platform and operations work alone could take one or two engineers' time full-time, which is 15 to 25 percent of the team, before any feature is built. Larger organisations spread this cost across a platform team; a small product team pays it directly.
| Concern | Modular monolith | Microservices (about 6) |
|---|---|---|
| Deployments | one pipeline | six pipelines |
| Call between parts | method call, microseconds | network call that can fail |
| Cross-part consistency | one local transaction | saga or outbox, eventual |
| Moving a boundary | refactor in one codebase | change APIs, migrate data |
| Debugging a request | one log, one stack trace | distributed tracing |
| Independent scaling | whole app scales together | per service |
3Enforcing Boundaries Inside One Codebase
The usual objection to a monolith is that boundaries erode until everything depends on everything. That is why the word modular matters, and why we enforce it automatically. Spring Modulith treats each direct sub-package of the application's main package as a module and can verify that modules only use each other's public API. ArchUnit lets us write the same rules as ordinary unit tests.
Modules can also talk through application events instead of direct calls, which Spring Modulith supports with a persisted event publication registry. That keeps them loosely coupled, and if we later extract a module into a service, those events can move to a broker such as Kafka with little change to the code that publishes them. Check your Spring Modulith version for the exact annotations and options.
4Why an Uncertain Domain Favours One Codebase
In a new product, our first guess at the boundaries is often wrong. We may start with separate orders and fulfilment, then discover that most changes touch both, or that subscriptions are a concept of their own. Inside one codebase, moving that boundary is a refactoring: rename packages, move classes, run the tests, done in days. Between services, the same change means redesigning APIs, migrating data between databases and coordinating deployments, which can take weeks.
So the cost of being wrong is much lower in a modular monolith, and in an uncertain domain we will be wrong several times. Microservices make boundaries rigid, which is a strength when we know them and a burden while we are still learning.
5Extracting Services Later, With Recorded Triggers
Choosing a modular monolith is not choosing to stay one forever. We extract a service when there is a concrete reason. A scaling reason: one module needs very different resources, such as image processing needing ten times the CPU of the rest. A team reason: the team grows past two teams of 8 and they keep blocking each other's releases. A release reason: one part must deploy several times a day while the rest is risky to deploy. Or an isolation reason, such as a module with stricter security or compliance needs.
We write these triggers in the ADR that records the decision, so the question 'should we split now?' has an agreed answer. Clean module boundaries make the extraction much cheaper when the time comes, because the module already has its own data and a narrow interface.
- Start as a modular monolithboundaries enforced by tests
- Does a module need separate scaling?YesCandidate for extractionNoCheck the next trigger
- Do teams block each other's releases?YesCandidate for extractionNoCheck the next trigger
- Different security or release needs?YesCandidate for extractionNoStay in the monolith
- Extract along the existing module boundaryits data and events move with it
5 steps in order. Play them, or step through them one at a time.
6Follow-up questions
Is a modular monolith just a monolith with good intentions?
Not if the boundaries are enforced. With Spring Modulith or ArchUnit tests in CI, a pull request that reaches into another module's internals fails the build, so erosion becomes a visible decision rather than a slow drift. Each module should also own its tables, even in a shared database, and other modules should not query them directly.
What if we already know we need to scale one part heavily?
Then that part may deserve to be a separate service from the start, while the rest stays a modular monolith. The choice is not all or nothing. The point is to pay the cost of distribution only where we have a clear reason for it.
How do you keep data separated inside one database?
Give each module its own schema or table prefix, let only that module's code access it, and check this with ArchUnit rules on repository classes. Cross-module reads go through the owning module's API or events. That makes a later extraction a matter of moving a schema, not untangling joins.
7Conclusion
In this answer, we saw that microservices bring network calls, distributed data, many deployments and observability work, which is a heavy cost for 8 engineers. A modular monolith keeps one deployment while enforcing module boundaries with Spring Modulith or ArchUnit, and it makes the frequent boundary changes of an uncertain domain cheap. We extract services later for clear scaling, team, release or isolation reasons, and record those triggers in the decision.
Open with
With 8 engineers and an uncertain domain, I would start with a modular monolith. Microservices cost a lot: every boundary is a network call that can fail, data is spread across databases so cross-service operations need sagas or outboxes, and every service needs its own pipeline, dashboards and on-call knowledge.
Then, if they want more
For a team of 8 that could easily take one or two people's time before any feature work.
A modular monolith keeps one deployment, but the code is split into modules that own their data and expose a small API, and I would enforce that with Spring Modulith's verify test or ArchUnit rules in CI, so boundary violations fail the build. Modules can talk through events, which makes a later extraction easier.
The uncertain domain is the strongest argument: our first boundaries will probably be wrong, and moving a boundary inside one codebase is a refactoring, while between services it means changing APIs and migrating data.
So I would extract a service only when there is a concrete reason: a module that needs very different scaling, teams blocking each other's releases, or different security or release needs. I would write those triggers into the ADR, so we know in advance what would make us split.
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 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 "Your team must choose between a modular monolith and microservices for a new product...": https://scrivio-interview-library.netlify.app/architecture/architecture-decisions/1a909f3f69/