Catalog My learning Blog
System Design Roadmap: 100-Day Course for Engineers · Phase 1 · Lesson 9 · 4 min read

Monolithic vs Distributed Architecture Trade-offs

On this page
  1. Monolith vs distributed architecture: the trade-offs
  2. Advantages of a monolith, and the modular monolith
  3. When a monolith starts to hurt
  4. Worked example: extracting a recommendations service
  5. What a distributed architecture costs you
  6. Check yourself

Monolith vs distributed architecture: the trade-offs

Most applications start as a monolith: one deployable application holding the UI, business logic and data access, usually with one database. A distributed architecture splits the system into services that are deployed separately, usually own their own data, and talk over the network.

Neither is better in general. The question is which costs you can afford right now.

MonolithDistributed services
DeploymentOne artifact, one stepMany, on independent schedules
ScalingThe whole app togetherEach service separately
TransactionsOrdinary database transactionsCoordination across services (Day 49)
DebuggingOne process, one log, one stack traceTracing a request across services
FailureOne bug can take down everythingFailures can be isolated, if you design for it
Team fitSmall to medium teamsMany teams owning separate services
A monolith deploys and scales as one unit; a distributed system scales each service separately, at the cost of network calls between them.
A monolith deploys and scales as one unit; a distributed system scales each service separately, at the cost of network calls between them.

Advantages of a monolith, and the modular monolith

Early on, a monolith is faster to build and change. A feature touching checkout and inventory is one pull request and one database transaction. There's no network between modules, so no timeouts, retries or partial failures inside the app.

A monolith doesn't have to be a tangle. A modular monolith is one deployable with strict boundaries between components. Shopify chose this for its core platform in 2019 instead of microservices, writing that microservices "would bring another whole suite of problems" (Shopify Engineering). In .NET, put each module in its own project, keep its classes internal, expose a small public interface, and enforce the rules with architecture tests such as NetArchTest. Modules with clean boundaries are also the ones you can extract later.

When a monolith starts to hurt

As the system and team grow:

  • Scaling is coarse. A monolith scales out fine behind a load balancer (Day 2). But if image processing needs 10 times the CPU, every copy carries it. A cheap first step: deploy the same build twice, one pool serving web traffic and one running background jobs, and scale each pool separately.
  • One module's problem is everyone's. A memory leak in recommendations crashes checkout, because they share a process.
  • Teams block each other. Fifty developers in one codebase means merge conflicts and coordinated releases.

Worked example: extracting a recommendations service

An e-commerce monolith has catalog, cart, checkout and a recommendation engine. Two years in, recommendations use heavy CPU, deploy weekly with model changes, and occasionally slow the whole process. That's a clear signal for that one module: it needs different scaling, a different release pace, and isolation.

Move it to its own service, called over HTTP with a strict timeout and a fallback: if recommendations don't answer in 100 ms, show a generic "popular items" list. Leave catalog, cart and checkout in the monolith. They share data and transactions, and splitting them buys nothing yet.

Then decide where its data comes from, which is the part teams skip. If the new service reads the monolith's order tables directly, you've split the code but not the system: a schema change in the monolith can break recommendations, and its heavy queries still load the main database. Give it its own store, fed by events or a periodic export of the orders and views it needs (Day 58).

What a distributed architecture costs you

The moment you split, you need things a monolith never needed:

  • a way for services to find each other (Day 54),
  • timeouts, retries and circuit breakers so one slow service doesn't stall the rest (Days 56, 74 and 75),
  • distributed tracing to follow one request across services (Day 88),
  • a plan for consistency without a single database transaction.

That's real work and real operational cost. Pay it when the monolith's pain is real, not in anticipation. The worst outcome is a distributed monolith: services that share a database or must be deployed together. You pay every cost of distribution and get none of the independence (Day 51).

Check yourself

Usually no. They'd pay the full operational cost of a distributed system with none of the benefits, which come from independent teams and scaling needs they don't have yet.

Deploy the same build as a separate worker pool that runs only export jobs, and scale that pool on its own. Same code, separate resources.

A network call can be slow or fail. Without a timeout and fallback, a recommendations problem would still slow or break every product page, losing the isolation the split was for.

The two are coupled through the schema, so a monolith change can break it, and its queries still load the main database. Give it its own copy of the data it needs.

It's a single deployable application divided into modules with clear boundaries, each owning its own data and talking to others through defined interfaces. You keep simple deployment and in-process calls, and if one module later needs to scale or move on its own, the boundary already exists.