Martin Fowler's 'MonolithFirst' advice remains sound: almost all successful microservices architectures started as monoliths that were decomposed after the team understood the domain boundaries. Shopify runs one of the largest Rails monoliths in the world, processing billions of dollars in transactions. Stack Overflow serves millions of developers from a monolithic .NET application. The monolith is a valid architectural choice, not a legacy pattern to escape.
Monoliths offer concrete advantages for small to mid-size teams. A single deployment unit simplifies CI/CD, monitoring, and debugging. Cross-cutting changes -- updating an authentication library, changing a logging format -- happen in one place. New developers onboard faster because the entire system lives in one repository with consistent patterns. Operational overhead is minimal compared to managing dozens of services.
The problems attributed to monoliths -- slow builds, merge conflicts, deployment bottlenecks -- are symptoms of poor modular design, not inherent limitations of the architecture. A well-structured monolith with clear module boundaries, enforced dependency rules, and a comprehensive test suite can support teams of 50+ engineers without the operational cost of distributed systems.
Microservices solve organizational problems more than technical ones. When multiple teams need to deploy independently on different cadences, microservices provide the isolation that enables this. When different parts of the system have fundamentally different scaling requirements -- a CPU-intensive image processing pipeline alongside a lightweight REST API -- separate services allow targeted resource allocation.
The two-pizza team threshold is a useful indicator. Amazon's Jeff Bezos mandated that teams should be small enough to be fed by two pizzas. When the engineering organization grows beyond 40-50 people and needs to be divided into autonomous teams, microservices provide clear ownership boundaries. Each team owns one or more services, controls their deployment schedule, and makes technology choices within their boundary.
Domain complexity also factors in. When the system spans genuinely distinct business domains -- billing, inventory, shipping, recommendations -- and each domain has different data models, change rates, and scaling characteristics, microservices align the technical architecture with the business structure. But this alignment only works if the domain boundaries are well understood, which typically requires building and operating the system as a monolith first.
Evaluate four dimensions before choosing an architecture. Team size: under 20 engineers strongly favors a monolith. Between 20 and 50 depends on how the teams are organized. Over 50 with autonomous product teams may benefit from microservices. Sam Newman's 'Building Microservices' argues that the organizational structure should drive the architecture, not the other way around.
Operational maturity matters. Microservices require distributed tracing, centralized logging, container orchestration, service mesh or API gateway, automated deployment pipelines, and on-call rotation per service. If the team does not already have these capabilities, the cost of building them will delay product development by months. A 2024 InfoQ survey found that 67% of failed microservices migrations cited operational complexity as the primary cause.
Domain understanding is the third dimension. If the team is still discovering domain boundaries -- which happens in early-stage products -- decomposing prematurely creates wrong boundaries that are expensive to fix. The modular monolith pattern, where the codebase enforces module boundaries without the operational overhead of distributed deployment, offers a middle path that preserves future optionality.
The modular monolith combines the operational simplicity of a single deployment unit with the organizational benefits of clear boundaries between components. Each module owns its data, exposes a defined interface, and communicates with other modules through explicit contracts rather than direct database access. Frameworks like Spring Modulith and Elixir's umbrella projects provide tooling for enforcing these boundaries.
Shopify's transition to a modular monolith, documented in their engineering blog, involved defining component boundaries, enforcing dependency rules with static analysis, and gradually eliminating circular dependencies. The result was a codebase where teams could work independently within their modules while still deploying as a single application. Build times improved because changes to one module only required testing that module and its dependents.
The modular monolith also serves as a stepping stone to microservices if the organization eventually grows to that point. Because modules already have defined interfaces and own their data, extracting a module into a standalone service is a straightforward mechanical process rather than a risky refactoring project. This approach lets teams delay the microservices decision until they have both the organizational scale and operational maturity to support it.
If the organization outgrows the monolith, the strangler fig pattern provides a safe migration path. New features are built as services from the start. Existing functionality is extracted incrementally, starting with the components that benefit most from independence. An API gateway or facade sits in front of both the monolith and new services, routing requests transparently so clients are unaffected.
Extract the easiest wins first -- components with few dependencies on the rest of the monolith, clear data ownership, and high independent change rates. Notification systems, search indexing, and file processing are common first extraction candidates. Each extraction builds the team's operational muscle for running distributed systems before tackling more entangled components.
Plan for a long migration. Spotify's decomposition took over three years. Even smaller organizations should expect 12-18 months for a meaningful migration. The monolith and services will coexist during this period, requiring clear routing rules, data synchronization strategies, and monitoring that spans both worlds. Teams that underestimate the migration timeline end up with a distributed monolith -- the worst of both architectures.
Parte de nuestra guía completa: MVP Scoping & Product Development →
Este artículo forma parte de nuestro knowledge hub sobre mvp scoping & product development. Lee la guía completa para un marco estratégico completo.
Nuestro equipo ayuda a las empresas a implementar los marcos y estrategias tratados en este artículo.
Contáctanos