Technical
Why I Stopped Reaching for Microservices
Early in my career I thought microservices were the professional way to build software. Monoliths were what amateurs wrote. Four months of shipping production systems as a solo consultant cured me. Now I default to monoliths and only split when reality forces it.
The First-Principles Question
Microservices solve one real problem: independent deployability for independent teams. If you do not have independent teams, you do not have the problem microservices solve. You have the costs without the benefit.
Those costs are not theoretical. Network calls where function calls used to be. Eventual consistency where transactions used to be. Distributed tracing where stack traces used to be. Each one is a category of production issue I now have to reason about.
What I Build Instead
I build well-organized monoliths. The code is split into modules that respect bounded contexts. Each module has a clear interface. Dependencies flow in one direction. If I ever need to extract one into a service, I can, because the boundaries already exist in code. But most of the time I do not need to.
app/
billing/ # bounded context, clear boundary
models.py
service.py
api.py
notifications/ # another bounded context
models.py
service.py
api.py
shared/ # cross-cutting concerns
auth.py
db.pyThe modules talk through function calls, not HTTP. Failures are exceptions, not timeouts. Testing is fast because there is no network.
When I Actually Split
I split services when three conditions are true at once: different scaling profiles, different deployment cadences, and different teams. If any one is missing, a module is fine. This threshold has kept me out of distributed systems hell while my monoliths grew without strain.
The industry is slowly admitting this. Even former microservices advocates now talk about monolith-first. See Martin Fowler's original MonolithFirst post for the argument that predates most of the recent discourse.
Distribute when reality demands it. Not when Twitter does.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read