Monolith vs Microservices vs Serverless: A Decision Guide
Compare monoliths, modular monoliths, microservices and serverless on team size, scaling, cost, operations and consistency, with clear recommendations.
Published November 27, 2026
Monolith, microservices and serverless are not stages of maturity where every system should end up on the right. They are different trade-offs between simplicity, independence and operational overhead. This guide compares them across the dimensions that actually matter and gives a default recommendation for common situations.
The concept
A monolith is one deployable unit containing all functionality, usually with one database. It is the simplest to build, test, deploy and debug, and in-process calls are fast and transactional. Its risks are coupling (everything can call everything) and deployment contention as many people work in one codebase. A modular monolith keeps the single deployment but enforces internal module boundaries, removing most of the coupling risk.
Microservices split the system into independently deployable services, each owning its data. They allow teams to release independently, scale hot components separately, and use different technologies. In exchange, you get a distributed system: network failures, eventual consistency, distributed tracing, service discovery, versioned APIs and much more infrastructure. Serverless (functions as a service plus managed services) removes server management and scales to zero, but adds cold starts, execution limits, vendor coupling and harder local development.
Side-by-side comparison
| Dimension | Monolith | Modular monolith | Microservices | Serverless |
|---|---|---|---|---|
| Team size sweet spot | 1-15 | 5-50 | 30+ (many teams) | Any, for event-driven workloads |
| Deployment | One unit | One unit | Many independent | Per function |
| Data consistency | ACID, easy | ACID, easy | Eventual, sagas | Depends on managed stores |
| Operational overhead | Low | Low | High | Low servers, high integration |
| Independent scaling | No | Limited | Yes | Automatic, per function |
| Debugging | Easy | Easy | Needs tracing | Needs tracing, harder locally |
| Cost at low traffic | Low | Low | Higher (baseline infra) | Very low (scale to zero) |
| Cost at high steady traffic | Low | Low | Medium | Can be high |
Operational surface area
A sensible default path
Recommendations by situation
These defaults are right more often than not; deviate when your drivers clearly say so.
- Early-stage startup or new product: monolith or modular monolith on a mainstream framework
- Growing product with 3-8 teams: modular monolith, extract services only for clear scaling or ownership needs
- Large organisation with many autonomous teams and mature platform engineering: microservices
- Event-driven glue, scheduled jobs, spiky or low-traffic workloads: serverless functions
- Strict transactional domains (ledgers, inventory): keep them in as few services as possible
Practical examples
A serverless piece that fits well
Image thumbnails triggered by uploads: spiky, stateless, event-driven.
# serverless.yml (AWS Lambda)
functions:
thumbnail:
handler: src/thumbnail.handler
memorySize: 1024
timeout: 30
events:
- s3:
bucket: user-uploads
event: s3:ObjectCreated:*Microservice boundary that earns its cost
Search has different scaling, tech (OpenSearch) and team ownership.
orders (monolith module) --OrderPlaced event--> search-indexer service --> OpenSearch
users query: GET /search?q=... → search service (independent deploy, autoscaled)The "distributed monolith" smell
If every deployment needs all services released together, you have the costs of both worlds.
release checklist:
[x] deploy users-service v42
[x] deploy orders-service v87 (requires users v42)
[x] deploy billing-service v31 (requires orders v87)
→ services are not independently deployable; reconsider boundariesCommon mistakes
- Starting with microservices for a small team and an unproven product.
- Splitting by technical layer (UI service, logic service, data service) instead of business capability.
- Sharing one database between "microservices", recreating the monolith's coupling with network latency.
- Going all-in on serverless for steady high-throughput workloads where containers are cheaper.
- Assuming a monolith must be messy; modularity is a design choice, not a deployment model.
Key takeaways
- None of these is universally better; each trades simplicity for independence differently.
- Monoliths and modular monoliths are the right default for most teams.
- Microservices pay off with many autonomous teams and mature operations.
- Serverless excels at spiky, event-driven, low-baseline workloads.
FAQ
When should we move from monolith to microservices?
When concrete pain appears: teams blocking each other on releases, components with very different scaling needs, or clear ownership boundaries. Not because the codebase reached a certain size.
Can a system mix all three?
Yes, and most mature systems do: a core modular monolith, a few extracted services, and serverless functions for event processing.
Are microservices required for scalability?
No. Monoliths scale horizontally behind a load balancer very well. Microservices mainly scale the organisation, plus allow independent scaling of specific components.