Interview prompt
Explain choosing an architecture style from constraints to an engineer who understands the surrounding system but has not used this technique. Walk from its contract to a concrete operation, then discuss where it fails or becomes expensive.
A strong answer
An architecture style shapes how components communicate, deploy, and fail. A modular monolith can preserve one deployment unit while enforcing code-level boundaries. Services add independent deployment and scaling but also require network contracts, operations, and failure handling.
A small team with one release cadence may benefit from a monolith whose internal modules have explicit interfaces. A high-volume subsystem with a distinct scaling profile may justify extraction once measurement shows deployment or resource isolation is valuable. The decision should account for team ownership as well as runtime behavior.
A complete answer also calls out the assumptions that control correctness. Microservices turn local calls into remote interactions with timeouts, partial failure, data ownership, and observability requirements. A monolith can still have poor boundaries, and splitting it does not repair them automatically. Architecture should follow constraints that exist, not scale imagined for later.
Close by describing one representative test or measurement. Your team proposes extracting search into a service. List the evidence that would justify the operational cost and the data ownership boundary the new service would need.
Follow-up questions
Answer the follow-ups in the frontmatter. Use the linked article for the concept and the trace to make the explanation concrete.