Microservices vs Monolithic Architecture

Two different approaches to designing modern software systems.

Pavel Bařina
1 / 8

Monolithic Architecture

One single deployable unit — all layers tightly coupled together.

Single Deployable Unit Presentation Layer (UI) HTML / CSS / JavaScript Business Logic Layer Controllers / Services / Validators Data Layer ORM / Repository / Database 2 / 8

Microservices Architecture

Independent services communicate over a network via APIs.

API
Gateway
person
Users
shopping_cart
Orders
credit_card
Payments
lock
Auth
inventory_2
Products
notifications
Notifications
3 / 8

Comparison

Hover over the bars to see values.

Monolith Microservices
Scalability
Low
High
Complexity
Low
High
Deploy speed
Mid
Fast
Ease of start
Easy
Hard
4 / 8

Key Challenges of Microservices

Distributed systems introduce problems that simply don't exist in a monolith.

public
Network latency
Every service call goes over the network — failures and slowdowns must be handled explicitly.
storage
Data consistency
Each service owns its database — keeping data in sync across services is complex.
manage_search
Observability
Tracing a single request across 10 services requires dedicated logging, tracing & monitoring tools.
rocket_launch
Deployment complexity
Requires container orchestration (e.g. Kubernetes) and CI/CD pipelines per service.
security
Security
Inter-service communication must be authenticated and encrypted — larger attack surface.
science
Testing
Integration and end-to-end tests are much harder when services are independent.
5 / 8

Real-world Examples

Who uses what — and why?

✦ Microservices
Netflix700+ microservices, 2M+ req/s
AmazonPioneered microservices at scale
UberMigrated from monolith to 2000+ services
VS
✦ Monolith (successfully)
ShopifyModular monolith, $7B+ revenue
Stack OverflowServes 1B+ req/month with ~9 servers
BasecampRails monolith, intentionally simple
6 / 8

When to choose what?

view_in_ar
Monolith
  • Small team
  • Early-stage product
  • Simple domain
  • Fast prototyping
VS
hub
Microservices
  • Large teams
  • High traffic / scale
  • Multiple domains
  • Independent releases
7 / 8

Sources

8 / 8