Accent

πŸ‘‹ Download my CV
Download CV
All Articles
Microservices vs Monoliths: When to Choose What
Architecture Dec 2024 Β· 6 min read

Microservices vs Monoliths: When to Choose What

My practical experience navigating the tradeoffs between monolithic and microservices architectures across different project scales.

The Question Nobody Answers Honestly

Every architecture discussion gravitates toward microservices as the β€œmature” choice. But after building both monoliths and distributed systems I’ve come to a more nuanced view: the right answer depends almost entirely on team size and traffic profile.

Start Monolithic (Almost Always)

A well-structured monolith is faster to build, easier to test, and simpler to deploy. For solo developers or small teams (1–5 engineers), the cognitive overhead of service boundaries, inter-service networking, and distributed tracing often costs more than it saves.

I’ve shipped a Laravel monolith that served 50k users/month with zero scaling issues β€” because vertical scaling is cheap and SQL is really fast.

# Deploying a monolith: one artifact, one pipeline
git push heroku main

Versus microservices, which require:

  • Container orchestration (Kubernetes or ECS)
  • Service discovery
  • Distributed tracing (Jaeger, Zipkin)
  • Per-service CI/CD pipelines
  • API gateway

When Microservices Make Sense

Split when a specific domain has different scaling needs or different deployment cadences than the rest:

  1. Your media processing pipeline needs 10Γ— more CPU than your API β€” separate it.
  2. Your notifications service is changing weekly while billing is stable β€” separate it.
  3. Different teams own different domains and shipping velocity is blocked by merge conflicts.
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  API Gateway (nginx/Kong)                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Auth     β”‚  Catalog  β”‚  Orders + Payments   β”‚
β”‚  Service  β”‚  Service  β”‚  Service             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The Strangler Fig Pattern

You don’t have to rewrite everything. Extract services incrementally using the Strangler Fig pattern β€” route specific endpoints to new services while the monolith handles the rest. This is how most real migrations happen.

My Rule of Thumb

Start monolithic. Extract services when a specific boundary becomes a proven bottleneck or team ownership problem β€” not because it feels more β€œenterprise.”

Premature microservices is the new premature optimization.

Found this useful? Share it.