Skip to content

Monolith vs Microservices: How to Choose for a Growing Product

A practical framework for choosing between a modular monolith and microservices based on team ownership, deployment risk, data boundaries, scaling needs, and operational cost.

Choose a modular monolith by default. Split a capability into a separate service only when it has a real operational or delivery constraint that the monolith cannot meet safely. Microservices are not an upgrade path from a monolith. They exchange in-process complexity for distributed-systems complexity: network failures, partial failures, versioned contracts, and data that is no longer consistent in one transaction.

That trade is sometimes worth it. For most growing products, it is worth it later than teams expect, and for fewer parts of the system than the first architecture diagram suggests. This article is the framework I use to make the monolith vs microservices decision with evidence rather than fashion.

Define the terms clearly

Many debates go wrong because people mean different things.

ArchitectureWhat it isTypical risk
Unstructured monolithOne deployable app where any code can call any code and touch any tableEvery change risks breaking something unrelated
Modular monolithOne deployable app with modules that own their logic and data access behind interfacesBoundaries erode if not enforced
MicroservicesSeveral independently deployable services, each owning its data and contractOperational overhead and distributed failures
Distributed monolithSeveral services that share a database or must deploy togetherCosts of both, benefits of neither

The real comparison for most teams is modular monolith vs microservices. An unstructured monolith is a code organization problem, and microservices do not fix it. A distributed monolith is the outcome to avoid most.

Start with the constraint, not the pattern

A service boundary is justified by a constraint the current deployment cannot meet. Common legitimate constraints:

  • Independent ownership. A separate team needs to deploy a capability on its own schedule without coordinating every release.
  • Different scaling profile. One workload, such as media processing or a high-volume ingestion endpoint, needs very different resources from the rest of the app.
  • Security or compliance boundary. A capability handles data that must be isolated with separate access, network rules, or audit.
  • Failure isolation. A risky or resource-heavy workload must not be able to take down the core product.
  • Different runtime. A capability is better built in another language or runtime, such as a machine learning workload.

“The codebase is big” or “we want to be scalable” are not constraints. They are usually signals to improve module boundaries, tests, and build speed first.

A decision table

QuestionIf yes, leans towardNotes
Can one team own and release all of it?Modular monolithCoordination cost is low
Does a separate team need its own release cycle?Separate serviceOnly if the boundary is stable
Does one capability scale very differently?Separate service or workerA separate worker process from the same codebase may be enough
Can the capability own its data completely?Separate serviceShared tables mean a distributed monolith
Do several capabilities need to change together often?Modular monolithFrequent joint changes mean the boundary is wrong
Does the team already run tracing, alerting, and on-call well?EitherIf not, services will hurt more
Is the domain still changing rapidly?Modular monolithBoundaries are cheap to move in-process

Notice the middle option: a separate worker or process deployed from the same codebase. Many scaling problems can be solved by running background jobs, scheduled tasks, or a heavy endpoint in separate processes while keeping one repository, one data model, and one release.

flowchart TD
  accTitle: Monolith vs microservices decision path
  accDescr: Start with a concrete constraint. If none exists, improve the modular monolith. If the constraint is scaling only, try a separate worker process from the same codebase. If the capability needs independent ownership or isolation and can own its data, and the team can operate it, extract a service and record the decision.
  A["Is there a concrete constraint?"] -->|"No"| M["Improve the modular monolith"]
  A -->|"Yes"| B{"Scaling only?"}
  B -->|"Yes"| W["Separate worker or process,<br/>same codebase"]
  B -->|"No"| C{"Can it own its data<br/>and contract?"}
  C -->|"No"| M
  C -->|"Yes"| D{"Can the team operate it?<br/>Tracing, alerts, on-call"}
  D -->|"No"| R["Build operational readiness first"]
  D -->|"Yes"| S["Extract a service<br/>and record the decision"]

The safe first step: modularize

Whether or not you ever split, a modular monolith is the right next step for most products. It gives you seams without network calls.

For each domain capability, such as billing, projects, notifications, or reporting:

  • It owns its commands, queries, policies, and internal implementation.
  • Other modules call a deliberate public interface, not internal functions.
  • Other modules do not query its tables directly.
  • Cross-module reactions use explicit calls or internal events.
  • Boundary rules are enforced with lint rules, package boundaries, or architecture tests.

Internal events through an outbox let modules react to each other’s facts without tight coupling, and those contracts carry over if a module is later extracted. See where event-driven architecture helps a SaaS product for how to design them.

A modular monolith also makes the eventual extraction decision cheaper. If a module really is independent, it will be visible: few inbound calls, clear data ownership, rare joint changes with other modules.

Count the operational cost honestly

Every new service needs:

  • its own build, deployment, and configuration;
  • secrets and access management;
  • health checks, logs, metrics, traces, and alerts;
  • a versioned API or event contract;
  • timeouts, retries, and idempotency on every call;
  • local development and test setup;
  • an owner who is on call for it.

A synchronous request that spans three services can now fail in three new places, plus the network between them. A transaction that used to be one database commit becomes a saga or an eventually consistent workflow. A bug that used to show up in one stack trace now needs a correlation id across several log streams.

None of these costs is a reason to avoid services forever. They are a reason to require a concrete benefit before paying them.

How to extract a service safely

If a seam proves real, extract it incrementally:

  1. Write down the decision. Record the constraint, the boundary, the alternatives, and the consequences in an architecture decision record.
  2. Harden the module boundary first. Make sure all access goes through the public interface inside the monolith.
  3. Define the contract. API and event schemas, error behavior, timeouts, and versioning.
  4. Move data ownership. Copy or backfill data to the new store, with the old path still authoritative.
  5. Dual-run where necessary. Read from both, compare results, and log differences.
  6. Switch traffic gradually. Use a flag or routing rule so you can switch back.
  7. Observe the new path. Compare error rate, latency, and correctness with the old path.
  8. Remove the old code and data once the new path is proven.

Each step should be deployable and reversible on its own. Avoid a “big bang” cut-over where the service, data migration, and client changes ship at once.

Signs you split too early

  • Most features require changes to several services at once.
  • Services share a database or read each other’s tables.
  • Releases need to be coordinated across services.
  • Local development requires running most of the system.
  • Debugging a single user problem requires searching several log systems without correlation ids.
  • Nobody can explain which service owns a given business rule.

If you see these signs, consider merging tightly coupled services back into a modular monolith. Undoing a premature split is a legitimate decision, not a failure. It is also a common form of technical debt worth estimating and reducing deliberately.

Signs the monolith is genuinely limiting you

  • A team regularly waits on another team’s release to ship.
  • One workload’s resource use degrades the whole product, and separate processes did not solve it.
  • A security or compliance requirement demands isolation that a shared deployment cannot provide.
  • Build and test times stay slow even after investment in modularity and CI.
  • One module changes on a very different cadence from everything else and has a stable, narrow interface.

Monolith vs microservices checklist

Before extracting a service:

  • The constraint is written down and cannot be met by modularity or a separate worker process.
  • The capability already behaves as a module with a narrow interface.
  • It can own its data without other services reading its tables.
  • A named team will own its deployment and on-call.
  • Tracing, structured logging, and alerting work across services.
  • Contracts, timeouts, retries, and idempotency are designed.
  • The extraction plan is incremental and reversible.
  • One important end-to-end request path has been tested on the new boundary.
  • The decision is recorded in an ADR.

The question is not whether the architecture looks sophisticated. It is whether the new boundary reduces a concrete risk more than it creates new ones. Read the production readiness checklist before extracting a capability: the reliability work becomes more important with every network boundary, not less.

Frequently asked questions

Should a startup use a monolith or microservices?

Most early and growing products should start with a modular monolith: one deployable application with clear internal module boundaries. It keeps deployment, debugging, and data consistency simple while the product and team are still changing quickly.

When does it make sense to split a monolith into microservices?

Split a capability when it has a concrete constraint the monolith cannot meet safely, such as independent deployment by a separate team, very different scaling needs, a stricter security or compliance boundary, or isolation from failures, and when the team can operate the extra infrastructure.

What is a modular monolith?

A modular monolith is a single deployable application divided into modules that own their own logic, data access, and policies. Other modules use a deliberate public interface instead of reaching into internal functions or tables.

Do microservices need separate databases?

For a real service boundary, yes in practice. If several services read and write the same tables, they are coupled through the schema and must change together, which removes most of the benefit of separate deployment.

Is a large codebase a reason to move to microservices?

Not by itself. A large codebase usually needs better module boundaries, faster builds, and stronger tests first. Splitting tangled code into services tends to move the tangle into network calls.

[NL] Newsletter

Practical notes for building work that lasts.

Occasional field notes on product engineering, architecture, and delivery. No recycled growth hacks.

Start with the free production readiness checklist

Check your inbox to confirm your subscription.

Processed by Brevo