Modular Monolith vs Microservices
Ask a team why their first release needs microservices and you will usually hear “we’ll need it once we grow.” The follow-up rarely gets asked

This article is for product leads, CTOs, and engineering managers who have to make that call for a SaaS product, a platform, or a portal. It treats the choice as two separate decisions: how you control coupling in the code, and whether you need operational separation at all.
Modularity and Distribution Are Two Different Decisions
Most arguments about this topic go wrong because they bundle two things together. Modularity is about keeping code from tangling: billing doesn’t reach into catalog’s tables, and publishing doesn’t call private functions in user management. Distribution is about running those parts as separate programs that deploy, scale, and fail independently. You can have the first without the second. Every distributed system needs the first anyway.
A modular monolith is one deployable application with enforced internal boundaries. Orders, billing, and content live in separate modules. Each owns its own rules and ideally its own data, and they talk through published interfaces using in-process calls.
Microservices make those boundaries physical. The classic definition from James Lewis and Martin Fowler, collected in Martin Fowler’s microservices guide, describes a suite of small services, each running in its own process, built around business capabilities, communicating through lightweight mechanisms such as HTTP APIs, and deployed independently by fully automated machinery. That last clause is the one teams tend to skip, and it carries most of the cost.
The style itself is younger than its reputation suggests. Adrian Cockcroft’s Netflix microservices retrospective at QCon notes that the first public talks on Netflix’s cloud architecture came at QCon San Francisco in 2011 and QCon London in 2012. The term only took off in 2013, alongside Docker. Much of today’s advice comes from a decade in which the industry moved toward microservices fast and then spent the following years finding out where the costs landed.

The Two Models Side by Side
| Factor | Modular monolith | Microservices |
|---|---|---|
| Deployment | One deployable unit, one pipeline | One pipeline per service |
| Calls between parts | In-process function calls | Network calls over HTTP, gRPC, or messaging |
| Data | Usually one database, ideally one schema per module | Each service owns its own data store |
| Transactions | Ordinary database transactions across modules | No automatic transaction across services; eventual consistency or sagas |
| Failure behavior | One process; a crash takes everything down, but one stack trace finds it | Partial failures; isolation only if callers handle faults correctly |
| Scaling | Scale the whole application | Scale individual services |
| Debugging | Logs and a debugger in one place | Distributed tracing across services |
Read the table as a list of costs and capabilities, not as a scorecard. Microservices are the only column where one module can scale or fail on its own. They are also the only column where every arrow in your architecture diagram becomes a network call that can time out.
What Microservices Buy You, and the Conditions Attached
The official documentation from the cloud vendors is more careful than most blog posts. Microsoft’s microservices architecture guide lists inter-service latency, dependency chains, consistency and transaction management, version compatibility, and cross-service logging as concerns. It says fault isolation holds only if upstream services handle faults correctly, and that the style needs mature DevOps skills. AWS’s Well-Architected guidance supports splitting systems up, but it warns about a “Death Star” of interdependent services that ends up as rigid as the monolith it replaced. It also says that a team starting with a monolith should make it modular.
The common thread is that independent deployment is a capability, not a guarantee. You can deploy services separately and still be unable to change them separately.
The Distributed Monolith Is the Expensive Middle
Practitioner discussions on Reddit keep returning to one failure: many services that can’t actually run or deploy on their own. One engineer described a team of about 15 developers that had split into more than 20 services, with one person triggering all 20 deployments for a release. The split “didn’t resolve any issues.” Another described services that “couldn’t operate independently” and did redundant network and database work to reassemble data that used to sit in one query. A third found hardcoded configuration living in a shared legacy root that every service depended on.
That is the worst version of both architectures. You pay for network latency, retries, tracing, and per-service pipelines, and you still have to coordinate every change across teams. The usual cause is splitting before the domain boundaries are clear, so the services follow the org chart or the database tables instead of real business capabilities.
Data Ownership Decides What You Actually Built
Microsoft’s .NET guidance states the rule plainly in its section on data sovereignty per microservice: each service must be the sole owner of its database and share it with no other service. Other services get that data through its API, never by reading its tables.
Teams break this rule more often than they admit. In a 2024 mixed-methods study of 53 practitioners who had migrated to microservices, 34% said multiple services managed the same tables. If two services write to one table, you have one service with two deploy pipelines.
A Note on the Adoption Numbers
Survey figures are often used to argue that everyone is moving one way or the other. They don’t support that. Gartner Peer Community reported 74% of surveyed organizations using microservices in 2023. CNCF and SlashData put backend developers’ microservices use at 46% in Q3 2025. The Go Developer Survey found 43% building mostly microservices. These measure different populations with different questions, so they can’t be lined up into a trend.
The widely shared claim that “42% of organizations are consolidating back” doesn’t hold up either. The 42% figure is CNCF’s production use of service mesh, which fell from 50% in 2023. That measures one infrastructure layer, not architecture reversals. Sentiment has shifted toward modular monoliths, but no reliable number tells you how many teams are moving back.
A Modular Monolith Only Counts If the Boundaries Hold
A monolith with folders named billing and catalog is not a modular monolith. What separates the two is enforcement: explicit interfaces, restricted dependencies, and data that each module owns. Without enforcement, boundaries wear away one convenient exception at a time. Practitioners name the same culprit again and again: one module querying another module’s tables “just this once,” which then quietly becomes a permanent dependency.
Tooling helps. Spring Modulith, for Java and Spring teams, can check that module dependencies don’t form cycles, that modules are only accessed through their API packages, and that only explicitly allowed dependencies exist. It also lets you test one module and its dependencies on their own. The working rule from teams that keep boundaries clean is simple: a boundary violation fails CI, the same way a broken test does.
Shopify’s Lesson: Zero Violations Did Not Mean Isolated
Shopify’s 2024 retrospective on Packwerk, its static-analysis tool for Rails package boundaries, is the most candid evidence on this point. Packwerk missed dynamically generated constants, some loading mechanisms, and dependencies hidden in routes, fixtures, and initializers. A package with zero reported violations still couldn’t run in isolation. Making one base package truly independent took “many months” and a lot of inversion of control. Some of the fixes added indirection that made the code harder to understand.
Shopify’s response is the practice worth copying. They added CI tests that boot packages on their own to prove they actually run independently. Static checks tell you the code looks modular. Running a module alone tells you it is.
Modularizing Pays Off Even If You Never Split
Modularization is often sold as preparation for microservices. The evidence suggests it is valuable on its own. Carbon Health’s 2025 study of 107 incident reports, covering five years of moving parts of a Scala monolith into Kotlin services, credits modularizing the monolith as a major contributor to fewer incidents and better stability. It helped teams understand their domains and fix bad queries before anything moved.
Drawing those boundaries is a modeling problem before it is a deployment problem. Our domain-driven design guide covers how to draw them around business capabilities so they still make sense when the product changes.
“We Can Split It Later” Has a Price
The standard pitch for a modular monolith is that clean modules can become services whenever you need them. That is true in the sense that good boundaries make extraction possible. It is not true in the sense of being cheap.
Google’s Service Weaver documentation explains why with unusual precision. Service Weaver is a Go framework built so components can run in one process or be split across many. Its docs warn that once components move to separate processes, a call can fail with a network error, and that error doesn’t prove the operation didn’t run. Retries can cause partial, full, or repeated execution, so any method that isn’t idempotent needs special handling. Components may run as multiple replicas with concurrent calls, and their interfaces must be serializable. The docs recommend testing in both local and distributed mode. Ordinary modular-monolith frameworks don’t give you that dual mode, so code written for in-process calls usually assumes things a network won’t honor.
Performance Can Drop Before Anything Leaves the Process
The most useful single data point comes from Faustino and colleagues, who migrated one system step by step from monolith to modular monolith to microservices and measured each stage. Their results appear in the study’s stepwise migration paper, later published in Performance Evaluation. On one content-listing workload at the larger database load, response time went from 61 ms in the monolith to 629 ms in the modular version to 4,317 ms as microservices.
The middle number is the surprise. The authors traced the modular-stage cost to how much data moved between modules in DTOs, not to how many calls there were. Getting the microservices version to perform required coarser interactions and caching, which brought their own consistency tradeoffs. It is one system and one workload, so treat it as a warning, not a benchmark.
Other evidence points the other way. A benchmark across Java, .NET, and Python built identical REST APIs in six variants and found architecture had negligible performance impact for Java and .NET. The Python monolith degraded badly, though Python stayed slower than the other two in either architecture. Taken together, these results say that data volume across boundaries, call patterns, and runtime matter more than the architecture label.
So benchmark the journey that pays the bills, such as checkout, publishing, or a dashboard query, at expected peak load. Compare p95 latency, not averages. If you do extract a service, the first things to break are contract compatibility and your ability to follow one request across processes, which is why API versioning and observability practices need to be in place before the first extraction, not after the first incident.
Practical rule: if two parts of the system must commit in the same transaction, keep them in the same process. Separate them only when you have a business reason and a plan for the half-finished case.
What Each Model Costs to Run
Licenses almost never decide this. The cost shows up in hours: pipelines to keep green, alerts to tune, on-call rotations, security patches, and the time it takes a new engineer to understand how a request moves through the system.
| Cost driver | Modular monolith | Microservices |
|---|---|---|
| Pipelines | One | One per service, plus shared templates to keep them consistent |
| Observability | Application logs and metrics | Centralized logging plus distributed tracing |
| Local development | Run one app | Run or stub many services |
| Staffing | Generalist backend engineers | Usually platform or DevOps capacity on top |
| Ongoing upkeep | One set of dependencies to patch | Every service needs patching, even the rarely used ones |
Loadsmart’s November 2025 retrospective puts real numbers on that last row. Looking at 2024 usage, cost, and maintenance data, the team estimated its microservices footprint at about $33,600 a year in infrastructure and $34,900 a year in engineering maintenance. Services that almost nobody used still needed upkeep, and some had been built by engineers who had since left, so nobody had the context to maintain them. Loadsmart decommissioned 12 of 44 services, with four more planned, because the product ideas, team size, and traffic behind them had changed.
Microservices Done Well Come With a Platform Budget
The large success stories share one feature: heavy investment around the services. BMW moved more than 1,300 microservices for ConnectedDrive between 2019 and mid-2023 with standard reference architectures, shared CI/CD and monitoring, reusable infrastructure-as-code, hands-on training, and monthly migration events. It now reports 14 billion daily requests at 99.95% uptime. These are AWS-published case studies, so read them as examples of what the investment looks like, not as neutral proof.
A line from practitioner commentary on X sums it up: “If you cannot afford a platform team, you usually cannot afford the operational surface.” Before you commit to an architecture that needs one, price the role. This comparison of DevOps and platform engineering explains what each role does day to day.
The seams between separately run systems are where we see projects lose time, too. When we rebuilt the stack behind Trends, The Hustle’s premium newsletter, the problem wasn’t any single tool. A custom CMS, a payment platform, and an email system each worked on their own and failed at the handoffs. Every boundary you run in production is one more handoff someone has to own.

The Signals That Justify Extracting a Service
The research doesn’t support a team-size threshold. One team of 15 developers failed with 20 services. Another team grew from 15 to more than 50 engineers in about six months and made microservices work, but only after building a GraphQL gateway, Kafka, centralized logging, Kubernetes CI/CD templates, and continuous delivery. A third organization had about 200 engineers working productively in one modular monolith and extracted only a few services for specific operational reasons. Headcount matters less than whether teams block each other and whether someone owns the platform.
What justifies a split is a constraint you can name in one sentence and measure today:
- Capacity that one deployable can’t absorb. Tchibo’s modular monolith launched in 2010 and handled more than twice the expected orders while traffic quadrupled. The move to cloud and microservices came in 2020, when peak demand meant booking servers manually months ahead.
- Teams blocking each other at deploy time. One practitioner described a monolith with a four-week release cycle and a CI run over 40 minutes, while a team running its own service deployed daily. A slow release process is a real reason, though better CI inside the monolith is sometimes the cheaper fix.
- One workload with a very different scaling curve, such as AI inference, media processing, or search indexing.
- A compliance or fault-isolation boundary, such as payment handling that must be isolated and audited separately.
| Situation | Likely fit | Why |
|---|---|---|
| New SaaS product or MVP with one small team | Modular monolith | The domain is still being learned; boundaries will move |
| Ecommerce where checkout and inventory share a transaction | Modular monolith | The transaction stays inside one process |
| Publishing platform with traffic spikes | Modular monolith first | Caching and scaling the whole app usually absorb spikes |
| Membership portal with a few developers | Modular monolith | The operating burden would outweigh the benefit |
| Several teams releasing on different schedules and blocking each other | Microservices for the contested areas | Independent release cycles are the actual need |
| One module with much heavier load, such as AI request handling | Extract that module only | Scale one part without distributing the rest |
If most of your answers point to one team and traffic a bigger instance can handle, start with the modular monolith. We cover the decisions you can and can’t easily undo in an early product in our guide on how we think about MVP architecture. Multi-tenant products add another layer, because tenant isolation choices shape where boundaries land. Our multi-tenant SaaS architecture guide walks through those choices before they harden.
How to Extract a Service Without Breaking the Product
Carbon Health’s incident data shows what happens when extraction moves faster than the groundwork. Its system ended up as a Scala monolith plus more than 20 Kotlin services with their own databases, while about three-quarters of the tables still lived in the monolith. Database, refactoring, over-fetching, infrastructure, and breaking-change incidents mostly peaked in 2022, the year of the most active decomposition. The authors note confounders such as pandemic-era load and staffing changes, so this isn’t proof of cause. The mechanisms they describe are still instructive. Banning cross-domain joins made ownership clear but pushed some performance problems into application code. Backfills and eventual consistency exposed code that assumed strong consistency. New frameworks brought network limits and threading problems that teams hit independently.
The sequence that holds up across the cases looks like this:
- Enforce module boundaries inside the monolith first. Explicit interfaces, one owner per module, and CI that fails on violations.
- Put data behind each module. Separate schemas and a repository layer, so nothing outside the module touches its tables. This step turns a future extraction into an infrastructure job instead of a rewrite.
- Prove isolation by running it. Boot and test the candidate module on its own, the way Shopify did. Zero static violations is not enough.
- Analyze the boundary before moving it. Measure call frequency and data volume across it. A chatty boundary needs coarser interfaces or caching first, or it will be slow once it becomes a network call.
- Run old and new side by side. Carbon Health’s order was: identify tables and queries, refactor into repository layers, migrate data, compare old and new behavior in production, then remove the monolith code. Some teams package the services together in one deployable image first and split them into separate images later.
- Retire the old path. Skipping this step leaves two versions of the same logic to maintain.
After each extraction, watch deployment lead time, rollback frequency, the share of changes that touch more than one service, incident recovery time, p95 latency on the affected journeys, and the number of synchronous calls between services. If those numbers stay flat or get worse, the extraction added cost and returned nothing.

Count the Business Cost, Not Just the End State
Architecture moves in either direction take time away from the product. One practitioner described a three-month consolidation of services back into one application, with a feature freeze. Complexity dropped and performance improved, and the company missed two major clients during the freeze. In their words: “Technically it’s a success, but from a business perspective I feel we slowed growth.” Weak test coverage makes this worse, which is why teams that consolidate well write tests first.
If the system you are reworking is older and less documented, the sequencing questions get harder. Our guide to legacy system modernization strategies covers how to stage the work so each step leaves you with a working product.
Choose for the Constraint You Have Now
Architecture fit changes over time. Tchibo’s modular monolith served it well for a decade before a capacity problem justified a move. Loadsmart’s services made sense when they were built and stopped making sense when the business changed. Both teams did the same thing right: they changed the architecture when they could point to a measured reason, and they treated pruning as maintenance, not as admitting a mistake.
For most products at the start, that means a modular monolith with boundaries enforced from the first sprint, data owned per module, and isolation proven in CI. Extract a service when a constraint you can measure shows up: teams blocking each other, a workload with its own scaling curve, or a compliance boundary. Distribution is a cost you pay on every deploy, every incident, and every new hire, so it needs a reason that pays it back. “We might grow” is a reason to keep your module boundaries clean. It isn’t a reason to distribute.
If you are making this call for a product you are about to build or rebuild, the useful work happens before any code: mapping the journeys that matter, the traffic you expect, the team you have, and where the real boundaries sit. That is the kind of early decision Refact’s product design and discovery work is built to settle, so the architecture you start with fits the release you need to ship next.
Building a product and unsure what to scope first? Let’s talk. Free 30-minute call, no pitch.
Masoud Golchin is a backend developer at Refact, working on server-side systems, internal tooling, and infrastructure. He builds and maintains the services that support both client projects and the team’s day-to-day development workflow. His work includes backend logic, developer tools, system reliability, and the technical foundations that allow products to scale and operate consistently. At Refact, Masoud focuses on creating practical engineering solutions that help the team move faster while keeping systems organized, maintainable, and dependable.
More from Masoud Golchin


