All jobs / Solutions / cloud architect / Application Architecture
Solutions / cloud architect interview question · 1–3 years
How do you keep a monolith modular enough that you could split it into services later?
The strongest answer
Modules with explicit public interfaces, each owning its own tables, no cross-module joins or shared entities, communication through interfaces or in-process events — with the rules enforced by build checks, not convention
Why it works
Right — a modular monolith is defined by data ownership and enforced dependencies, not by folders.
What a good answer covers
- Enforced modules, owned data.
- Explicit interfaces per module.
- No cross-module joins.
- Build checks enforce the rules.
Answers that fall short
- Close, but not the strongest: Organise the code into folders per feature and ask people to respect the boundaries
Folders and goodwill erode with the first deadline; boundaries need enforcement. - Weak: Keep one shared data model so every module has the data it needs
A shared data model is exactly the coupling that makes a later split impossible. - Red flag: Start with microservices instead; a monolith can never be split cleanly
Many monoliths have been split well; starting with services adds distribution cost before the boundaries are known.
Who gets asked this
More Application Architecture questions
- Booking a trip touches flights, hotel and payment services. How do you keep them consistent?
- How do you replace a large legacy system without a big-bang cut-over?
- When does separating read and write models earn its complexity, and when does it not?
- A team proposes event sourcing for the whole platform. What do you check before agreeing?
- How do you decide where one service ends and another begins?
- Six services share one database and every schema change needs six approvals. What do you propose?
- For a saga across several services — choreography through events, or an orchestrator?
- The platform team wants a service mesh. How do you decide whether it is worth it?