Skip to content

Modular monolith vs microservices: what each one costs, what the famous cases say and how to decide

What a monolith, a modular monolith and microservices are, the premium the network charges, what Segment and Prime Video actually said and how to migrate without rewriting everything.

Ramon Gomes 12 min read Level: Intermediate

Also available in: Español, Français, Português

For about ten years, "let's go with microservices" meant modern architecture. Projects with three devs were born with twelve services, a Kubernetes cluster and a map of arrows nobody could explain.

In the last few years the conversation changed. Well known teams wrote about why they merged services back together, and "modular monolith" became a buzzword. But you have to read those stories carefully, because people usually quote only half of them.

This article explains both approaches without picking a side, shows what the real cases actually say and ends with a practical way to decide. Sources checked on November 21, 2026.

Aerial view of a neighborhood with several small separate houses next to an apartment building, in the late afternoon
Separate houses or apartments in the same building. Both are legitimate ways to live.

What Each One Is

A monolith, in Kamil Grzybek's definition, is "a system that has exactly one deployment unit". That's it. The word says nothing about code quality. There are well organized monoliths and monoliths that turned into a big ball of mud, and the problem with the second kind isn't being a monolith.

A modular monolith is a monolith split into modules by business capability (orders, payments, inventory), not by technical layer (controllers, models, services). Each module exposes a small interface and hides the rest. One module doesn't touch another module's tables or internal classes.

Microservices, in the definition by James Lewis and Martin Fowler (2014), are "an approach to developing a single application as a suite of small services", each running in its own process and communicating through lightweight mechanisms such as HTTP. Each service owns its data and its deploy.

An isometric block represents the application; below, six named services have their own racks and databases, connected over a network with clock and warning symbols. The bottom panel groups six deploys, six databases, networking and queues, and monitoring as operating costs.
Splitting is easy. The network, the latency and the failures come along for free.

The Premium Microservices Charge

Fowler called it the Microservice Premium: microservices carry a fixed complexity cost that only pays off when the system is already too complex to manage as a monolith. In another piece, he lists what you gain and what you pay:

Gain Pay
Strong boundaries between modules (hard to break) Distribution: a network call is slow and can fail at any moment
Independent deploy for each part Eventual consistency: data in different services doesn't change together
Freedom of technology per service Operations: many services need a mature operations team

"Distribution" is the item that hurts most for people who have never run a distributed system. An in-process function call takes nanoseconds and never "goes down". A network call takes milliseconds, can be slow, can fail halfway and can succeed without you knowing. Everything we covered in the articles on resilience, queues and idempotency exists because of this.

Then there's the data. With microservices, the standard is database per service: nobody touches another service's tables, only its APIContract that defines how one program asks another for data or actions: which endpoints to call, what to send and what comes back. On the web, usually HTTP with JSON.. That protects the boundary, but it kills the JOIN across domains and the single transaction. An operation that touches orders, payments and inventory becomes a saga: a sequence of local transactions, with compensating actions if something fails halfway.

A timeline links a plane, hotel and car. In the final state, flight and hotel are cancelled and the car has failed. The return path leads to hotel compensation and then flight compensation, on separate cards; there is no rollback across services.
There's no rollback across services. There's undoing them one by one.

In a monolith, that's one BEGIN, three UPDATEs and one COMMIT.

What the Famous Cases Really Say

Segment (2018)

The "Goodbye Microservices" post is the most quoted one. Segment had more than 140 services, one per data destination. The problems: a shared queue where one slow destination held up the others, flaky tests that hit real APIs, shared libraries at different versions in each service and, in the post's words, three full-time engineers spending most of their time just keeping the system alive.

They merged everything into one service, in a monorepoSingle repository that holds several related projects or packages, such as apps and shared libraries, with common versioning and tooling., with one version of each dependency. The test suite went from up to an hour down to milliseconds.

What usually gets left out: the post also lists what got worse. A bug in one destination can now take down the whole service, and the in-memory cache became less efficient.

Prime Video (2023)

This is the most misquoted case. It wasn't "Prime Video went back to a monolith". It was one specific service, the audio and video quality monitoring one, which ran on Step Functions, Lambdas and S3. It reached about 5% of the expected load and hit the account's limit on state transitions. The components were merged into a single process on ECS, and operating cost dropped 90%, according to the account published by InfoQ. The author himself notes that the decision doesn't apply to every case.

On the left, four functions exchange data through S3 storage and the transitions bar reaches the account limit. On the right, one ECS chassis contains A, B, C and D, with data in memory. Bars compare costs, 90% lower for the audio and video monitoring service; source: InfoQ, 2023.
One specific service, not the whole platform. But the lesson holds: every network hop has a price.

Istio (2020)

Istio merged four control plane components (Pilot, Galley, Citadel and the sidecar injector) into a single binary, istiod. The reasons are a lesson in themselves: everything was written in Go, released together under the same version, run by the same team, and the dominant cost was a single one. They were paying the price of distribution without the independence that justifies it. That has a name: distributed monolith.

Basecamp and Shopify

Basecamp, from 37signals, has run a monolith since 2003. David Heinemeier Hansson wrote "The Majestic Monolith" (2016), arguing that small teams should build an integrated, well crafted monolith.

Shopify, with more than a thousand devs on one of the largest Rails codebases in the world, chose in 2017 not to break it into services: it reorganized the code by business domain, with boundaries guarded by tooling. In 2024 it published an honest retrospective on the tool it built for that (Packwerk): static boundaries with no violations didn't guarantee that a module could run in isolation, and "running code, more than any metric, will always be the best indicator of real progress".

What Nobody Measured

I didn't find any study that measures "how many companies went back to the monolith". There are public cases, not a measured trend. On the other side, the 2025 CNCF and SlashData survey shows microservices in use by 46% of back-end devs. Both things coexist.

Modular Monolith in Practice

The idea is to get microservice boundaries without paying for the network. The rules:

  1. Modules by business, not by layer.
  2. Small public interface. Everything else stays internal.
  3. Data per module. Each module has its own tables (or schema); other modules ask through the interface. This is what lets you extract a service later.
  4. Boundaries checked automatically, in CI. Without checks, a boundary becomes a suggestion within three months.
  5. Event-based communication when a module only needs to know that something happened in another.
One deploy contains Orders, Payments and Inventory, with a public API and locked internal compartment. Inventory access to Orders internals is blocked by the CI test. Below, an OrderCompleted envelope follows the public route between Orders and Inventory racks.
In a modular monolith, the wall is guarded by a test, not by the network.

In the Java ecosystem, Spring Modulith (version 2.2, from November 2026) does exactly this. Each top-level package is a module, the internal subpackage is private, and a test checks it:

java
class ArchitectureTest {
  @Test
  void modulesRespectBoundaries() {
    ApplicationModules.of(Application.class).verify();
  }
}

And communication between modules through events, with the publication recorded in the same transaction:

java
@Component
class InventoryManagement {

  @ApplicationModuleListener
  void on(OrderCompleted event) {
    // reduces stock in its own transaction, after the order commits
  }
}

In Node and TypeScript there's no single standard, but you get the same effect from a monorepo with one package per module and a lint rule that forbids importing another module's internals (eslint-plugin-boundaries and dependency-cruiser do this). For the folder structure, the idea is the same as in the article on front-end architecture: group by feature, not by file type.

When Microservices Are Worth It

They solve real problems. Signs that you have one of them:

  • Many teams need to ship on the same product without coordinating every deploy.
  • Parts with very different load profiles, like heavy video processing next to a light CRUD.
  • Different isolation requirements: the payments module needs another level of security or availability.
  • Different technology out of need, not taste: an AI model in Python next to a Node back end.
  • You already have mature operations: automated deploys, observability, distributed tracing.

And look at the first item. Conway's Law, from 1968, says organizations produce systems that copy their communication structure. Microservices are, above all, a tool for teams to work independently. With a single team, you pay the price without getting the main benefit.

Two stacked panels compare groups of people in teams A, B and C with isometric blocks for components A, B and C. Both diagrams preserve the same three connections: the system reproduces the structure of conversations.
Conway's Law: the system's design copies the design of the conversations.

Migrating Without Rewriting Everything

If you already have a monolith and need to pull parts out, the established pattern is the strangler fig, also from Fowler: the new system grows next to the old one, route by route, until the old one can be turned off. No rewriting everything from scratch in one go.

The order that works:

  1. Modularize on the inside first. If you can't separate the module in the same process, you won't manage it over the network.
  2. Separate the module's data.
  3. Extract the module with the strongest reason (scale, team, isolation).
  4. Measure before and after.
Cartoon of a man trying to carry twelve small suitcases by himself through an airport, each with a different tag, while next to him a woman walks by calmly pulling a single large suitcase with neat compartments
Twelve small suitcases don't weigh less than one big one. They're just more work to carry.

Quick check

1. By Grzybek's definition, what is a monolith?
Show answer

Answer: A system with exactly one deployment unit

Monolith is about deployment, not code quality.

2. What did the 2023 Prime Video case actually show?
Show answer

Answer: That a monitoring service became 90% cheaper by merging components into a single process

It was one specific service, with one specific load.

3. What is the main reason to adopt microservices, according to Conway's Law and Fowler?
Show answer

Answer: To let several teams ship independently, once the system has become too complex for a monolith

With a single team, you pay the premium without the main benefit.

Frequently Asked Questions

Does a monolith scale?

It scales horizontally like any stateless application: more replicas behind a load balancer. What you can't do is scale just one part of it.

Do microservices require Kubernetes?

No. You can run them on managed container services, on serverless or on regular machines. Kubernetes helps when there are many services.

How many services is too many?

There's no number. The warning sign is having more services than people to look after them, or services that always change and ship together.

Is a modular monolith the same as DDD?

No, but they go well together. DDD helps you find module boundaries (the bounded contexts). A modular monolith is one way to implement those boundaries in a single process.

Where do I start a new project?

A modular monolith, one database, modules by business, boundaries checked in CI. It's the path Fowler calls MonolithFirst.

References

Checked on November 21, 2026:

Source: https://ramongomessilva.com.br/blog/modular-monolith-vs-microservices · Accessed on December 02, 2026

Share Share on LinkedIn Share on X
Cite this article

Ready-made reference, with today as the access date.

ABNT

Brazilian standard (NBR 6023). Use it in theses and academic papers submitted in Brazil.

GOMES, Ramon. Modular monolith vs microservices: what each one costs, what the famous cases say and how to decide. Ramon Gomes, 29 nov. 2026. Disponível em: https://ramongomessilva.com.br/blog/modular-monolith-vs-microservices. Acesso em: 2 dez. 2026.

APA

American Psychological Association style. Common in scientific papers and journals, especially in the social, behavioral and health sciences.

Gomes, R. (2026, November 29). Modular monolith vs microservices: what each one costs, what the famous cases say and how to decide. Ramon Gomes. https://ramongomessilva.com.br/blog/modular-monolith-vs-microservices

BibTeX

Format for LaTeX users (Overleaf, for example). Paste it into your .bib file or import it into Zotero or Mendeley.

@online{gomes2026modularmonolithvs,
  author = {Gomes, Ramon},
  title = {{Modular monolith vs microservices: what each one costs, what the famous cases say and how to decide}},
  organization = {Ramon Gomes},
  year = {2026},
  month = nov,
  date = {2026-11-29},
  url = {https://ramongomessilva.com.br/blog/modular-monolith-vs-microservices},
  urldate = {2026-12-02}
}
Found a mistake?

Wrong fact, broken link, outdated information: tell me and I will fix it.

10 to 2,000 characters. If you can, point to the right source.

Only so I can reply. It never shows on any page of the site.

Written by

Ramon Gomes

Software Engineer

Full stack software engineer. I like taking a messy problem, listening to the people who live with it and shipping something that holds up day to day. These days I split my time between my own products, applied AI and client work.

Available for projects

Need Something Like This Built?

I build websites, systems, apps and AI automations, from design to deploy. Tell me what you need or see what I offer.

Related Articles