Key highlights
- A well structured monolith is usually the fastest and cheapest way to build and run a new product with a small team.
- Microservices pay off when many teams need to deploy independently or when specific parts of a system need to scale or fail on their own.
- Service boundaries should follow business capabilities, and getting them wrong creates a distributed monolith with the costs of both styles.
- Splitting a database removes easy transactions, so cross service workflows need patterns such as sagas with compensating steps.
- Migrate gradually with the strangler fig pattern instead of a big bang rewrite, and keep a rollback path at every step.
Founders often hear that large tech companies run on microservices and assume their new product should too. Developers working in a tangled codebase often believe that splitting it into services will fix the mess. Both assumptions can be expensive. The monolith vs microservices decision shapes how you deploy, how you hire, how large your cloud bill grows and how quickly you can ship changes.
Neither style is modern or outdated. A monolith is a single deployable application. Microservices split the same application into independently deployable services that talk over a network. Each choice moves complexity to a different place rather than removing it.
This guide compares deployment, service boundaries, communication, transactions, team size and operational costs. It also looks at verified examples from Netflix, Shopify and Segment, and explains how to migrate safely with the strangler fig pattern.
Start with a well structured monolith unless you already have several teams, clearly separate business domains and the operational skills to run distributed systems. Extract services later when a specific part needs independent deployment, scaling or ownership, and migrate gradually rather than rewriting everything at once.
- New product or small team: modular monolith
- Many teams blocked on one release: extract services
- Migrating: strangle gradually, never big bang
What monolithic and microservices architectures mean
A monolith is built and deployed as one unit. It usually has one codebase, one build pipeline and one main database. Modules call each other through ordinary function calls inside the same process, which is fast and easy to trace.
Microservices take a different approach. In their widely cited article, James Lewis and Martin Fowler describe the style as building a single application as a suite of small services, each running in its own process and communicating through lightweight mechanisms such as HTTP APIs. The services are organized around business capabilities and deployed independently through automated pipelines.
Between the two sits the modular monolith: one deployable application whose code is divided into modules with clear public interfaces and their own data. It keeps deployment simple while preparing the system for future extraction. For many growing products, it is the most practical starting point.
Deployment and scaling: one unit or many
With a monolith, you build one artifact, run one pipeline and roll back one version when something breaks. That simplicity is a real advantage. The downside appears as the team grows: every change ships with every other change, release coordination gets harder, and a bug in a minor feature can block an urgent fix elsewhere.
Scaling a monolith is not as limited as people assume. If the application is stateless, you can run many copies behind a load balancer. What you cannot easily do is scale one hungry component, such as video processing, without also scaling everything else.
Microservices let each team deploy on its own schedule and scale only the parts under pressure. The price is infrastructure: many pipelines, container orchestration, service discovery and versioned contracts. When Shopify evaluated microservices, its engineers noted they would have to maintain multiple different test and deployment pipelines, and that crossing the network between services adds latency.
| Factor | Monolith | Microservices |
|---|---|---|
| Deployment | One artifact, one pipeline | Many services, deployed independently |
| Scaling | Scale the whole app as copies | Scale each service on its own |
| Data | Usually one shared database | Each service owns its data |
| Transactions | Local ACID transactions | Sagas and eventual consistency |
| Debugging | One process, simple stack traces | Distributed tracing across services |
| Failure mode | A crash can affect everything | Partial failures, if isolated well |
| Team fit | Small to medium teams | Several autonomous teams |
| Operational overhead | Lower | Higher: more tooling and on call work |
Service boundaries: the hardest decision
Good boundaries follow business capabilities such as orders, billing, inventory or notifications, not technical layers such as a database service and an API service. A service should own a capability end to end, including its data, so it can change without asking permission from five other teams.
Boundaries are hard to draw before you understand the domain. In Monolith First, Martin Fowler observes that almost all successful microservice stories started with a monolith that grew too big and was broken up, while systems built as microservices from scratch often ended up in serious trouble. Refactoring a boundary inside one codebase takes an afternoon. Moving it between services can take a quarter.
Organization structure matters as much as code. Conway's law states that any organization that designs a system will produce a design whose structure copies the organization's communication structure. If one team owns four tightly linked services, they will usually behave like one service anyway.
If two services must always be deployed together, they are one service with a network call in the middle.
Communication between services: calls, events and failure
Inside a monolith, a function call either returns or throws an error. Across a network, a call can be slow, time out, succeed without you hearing about it, or fail halfway. Every interaction between services needs a plan for those cases.
Services communicate in two broad ways. Synchronous calls over HTTP or gRPC are simple to understand but create runtime coupling: if the payment service is down, checkout may be too. Asynchronous messaging through queues or event streams decouples services in time, at the cost of harder debugging and eventual consistency. Our comparison of REST vs GraphQL vs gRPC covers the synchronous options in more detail.
- Set a timeout on every outgoing call, and never wait forever
- Retry only idempotent operations, with backoff and a limit
- Use circuit breakers so one failing service does not drag down the rest
- Pass a correlation ID through every request and adopt distributed tracing
- Test contracts between services so a change in one does not silently break another
Data and transactions: the hidden cost of splitting
In a monolith with one database, placing an order, charging a payment and reserving stock can happen in one transaction. If any step fails, the database rolls everything back. This guarantee is easy to take for granted until it disappears.
In a microservices design, each service should own its data, so a single database transaction can no longer span the whole workflow. The common answer is a saga, which microservices.io defines as a reliably coordinated sequence of local transactions. If one step fails, compensating transactions undo the earlier steps. Sagas are coordinated either by choreography, where services react to each other's events, or by orchestration, where a central coordinator tells each participant what to do.
Consider a failed stock reservation after a successful payment. The saga must trigger a refund, update the order status and notify the customer. That is more code, more testing and more states to show in your user interface. Reporting also changes, because data that once sat in one database now needs a pipeline to bring it together.
If several services read and write the same tables, you carry the network and deployment costs of microservices without the independence. Teams still have to coordinate schema changes, which is exactly the problem microservices were meant to solve.
Team size, ownership and operational costs
Microservices are as much an organizational pattern as a technical one. They help when many teams need to ship without waiting for each other. With five developers, running fifteen services means each person owns several pipelines, dashboards, alerts and on call duties on top of feature work.
Segment's engineering team described this pressure openly. After splitting their event delivery system into over 140 services, they reported that three full time engineers spent most of their time just keeping the system alive. They consolidated the services into a single service and a monorepo, and reported 46 improvements to shared libraries in the year after, compared with 32 while the microservices were in place, according to their engineering write up.
- Infrastructure: more instances, load balancers, queues and network traffic between services
- Observability: centralized logging, metrics and tracing for every service, often priced per host or per data volume
- People: platform and DevOps skills, plus on call rotations for each service owner
- Developer time: harder local environments, contract testing and cross service debugging
There is no reliable universal figure for how much more microservices cost than a monolith, because it depends on traffic, tooling and team maturity. In our experience, small teams most often underestimate the time spent on monitoring, deployments and incident response rather than the raw server bill.
Real-world examples: who chose what and why
Netflix: from monolith to cloud microservices
Netflix began its cloud journey in August 2008, after a major database corruption left it unable to ship DVDs for three days. In its announcement of the completed migration, the company says it moved from a monolithic app to hundreds of microservices, finishing in early January 2016 after about seven years. The driver was reliability at very large scale, not fashion.
Shopify: a modular monolith on purpose
In a 2019 engineering post, Shopify described its core application as one of the largest Ruby on Rails codebases in existence, worked on by more than a thousand developers. Rather than splitting it into microservices, the team reorganized the code around business domains such as orders, shipping, inventory and billing, with public interfaces and clear data ownership. It also built an internal tool to detect boundary violations during CI.
Segment: microservices and back again
Segment moved its delivery system to microservices to isolate failures, with over one hundred destination types. The operational overhead grew with every new service, so the team consolidated them into one service. Their write up is honest about the trade offs they accepted, including weaker fault isolation.
The lesson across all three is that architecture follows scale, failure modes and team structure. It can move in either direction when those conditions change.
Migrating safely with the strangler fig pattern
Martin Fowler named the strangler fig approach after vines that grow around a host tree until they can stand on their own. Instead of rewriting a system in one risky project, you build new parts around the old one and move behaviour across piece by piece.
The Azure Architecture Center describes the mechanics. A facade, usually a proxy or API gateway, sits in front of the legacy system and routes each request either to old code or to a new service. Over time more routes point to the new system, the legacy part is decommissioned, and finally the facade can be removed. Microsoft also warns that the facade must not become a single point of failure or a performance bottleneck.
- 1
Modularize inside the monolith first
Group code by business domain, define public interfaces and stop modules from reaching into each other's tables. This step pays off even if you never extract a service.
- 2
Pick the first candidate carefully
Choose a capability with a clear boundary, low coupling and a real reason to separate, such as different scaling needs or a dedicated team.
- 3
Put a routing facade in front
Introduce a reverse proxy or gateway that can send specific routes to the new service while everything else still reaches the monolith.
- 4
Build the service and move its data
Copy the domain data to the new service's database, keep it in sync during the transition, and validate consistency before switching writes.
- 5
Shift traffic gradually with a rollback path
Start with a small share of requests, watch errors and latency, and keep the old path available until the new one is proven.
- 6
Delete legacy code and repeat
Remove the migrated code and tables from the monolith, update documentation, then choose the next candidate.
Independent services need automated builds, tests and deployments from day one. If your team still deploys by hand, start with our DevOps for beginners guide before extracting the first service.
A practical checklist for your decision
Use these questions with your technical lead or architect. If most answers point one way, you have your direction.
- Stay with a modular monolith if you have one or two teams, your domain is still changing quickly, and releases are not blocked by coordination
- Stay with a modular monolith if you lack automated deployments, centralized logging or on call routines
- Consider extracting services if several teams regularly wait on each other to release
- Consider extracting services if one component has very different scaling, security or reliability needs from the rest
- Consider extracting services if a capability has a stable boundary and a team ready to own it fully
Conclusion: choose the simplest architecture that solves today's problem
Monoliths and microservices are tools, not identities. A modular monolith gives most new products speed, simple operations and room to learn the domain. Microservices earn their cost when independent teams, scaling needs or failure isolation demand them, and the strangler fig pattern lets you get there without a risky rewrite. If you are weighing this decision for your product, talk to Brahmabyte Lab and we will help you choose an architecture that fits your stage, your team and your budget.
Frequently asked questions
No. A monolith is simply an application deployed as one unit, and many successful products run on one. Problems come from poor internal structure, not from the deployment model itself. A modular monolith with clear boundaries can serve a business for years.
Usually not until there is a clear, specific reason, such as several teams blocking each other on releases or one component needing very different scaling. Early products change too fast for stable service boundaries. Most startups are better served by a modular monolith first.
A modular monolith is a single deployable application whose code is split into well defined modules with public interfaces and clear data ownership. It keeps the simple deployment of a monolith while preparing parts of the system to be extracted later if needed.
A distributed monolith is a set of services that cannot be changed or deployed independently, often because they share a database or depend on each other's internals. It has the network and operational costs of microservices without the independence, so it is the outcome to avoid.
There is no standard timeline because it depends on the size of the codebase, data coupling and team capacity. Large migrations often run for years. For example, Netflix has described its move from a monolithic app to cloud microservices as a journey of about seven years.
Not automatically. Independent scaling can save money when one component has very different load, but more services also mean more instances, networking, monitoring and engineering time. Model the full cost, including people, before assuming savings.
Sources and references
- Monolith First, Martin Fowler (martinfowler.com)
- Strangler Fig Pattern, Microsoft Azure Architecture Center
- Deconstructing the Monolith: Designing Software that Maximizes Developer Productivity, Shopify Engineering
- Goodbye Microservices: From 100s of problem children to 1 superstar, Twilio Segment Engineering Blog
Cover photo by Brett Sayles
Stay in the loop
Get our latest guides on software, SaaS and growth delivered to your inbox.
By subscribing, you agree to get updates from Brahmabyte Lab. You can unsubscribe any time.


