Choose Between a Monolith, Microservices, and a Modular Architecture
GeneralmotorsSoftware Engineer · Technical ScreenLast updated
Compare monolithic and service-based architectures and plan incremental extraction or consolidation around domain boundaries, data ownership, and measured goals.
Compare a monolithic service, microservices, and a modular architecture. Explain how you would migrate a monolith toward services and how you would reconsider an overly fragmented microservice system in favor of clearer modules.
Constraints
No team size, workload, deployment constraint, or existing failure is prescribed. A modular architecture may be a modular monolith or well-defined modules within a service-based system; clarify the intended form. Do not assume that more services automatically improve scalability or maintainability.
Clarifying Questions
- Which current problem motivates the change: deployment coupling, scaling, ownership, reliability, or development speed?
- Where are the domain and data boundaries, and which operations need transactions?
- Can the migration be incremental while old and new components coexist?
Hints
Hint 1
Preserve a business invariant through the migration: A new network boundary changes failure and consistency behavior even when the extracted code initially looks identical.
Follow-up questions
- How would you avoid a distributed monolith with tightly coupled deployments?
- How would shared database ownership affect the extraction plan?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.