← all posts

Stop splitting your monolith too early

·2 min read ·Architecture · System Design · Microservices

The microservices hype convinced an entire generation of developers that a monolith is something to be ashamed of. It isn't.

A monolith is a perfectly valid architecture for most applications at most stages of their life. The problems people associate with monoliths—slow deploys, tight coupling, team conflicts—are usually people problems or code organization problems, not architecture problems.

What Microservices Actually Cost

Splitting a system into services means you now have:

  • Network calls instead of function calls. A local method call takes nanoseconds. A network call, even on the same cluster, takes milliseconds. And it can fail.
  • Distributed transactions. The moment you need to update data in two services atomically, you've entered a world of sagas and compensating transactions. This is genuinely hard.
  • Operational overhead. Each service needs its own deployment pipeline, health checks, logging aggregation, and alerting. What was one alert is now ten.

When Your Monolith is Fine

If a single developer can understand the full codebase in a week, your deployment pipeline runs in under 15 minutes, and your team fits in one room—your monolith is not your problem.

What to Do Instead

Split your code, not your services. Domain-driven folder structures, event-driven internal communication, clean module boundaries—all of this gives you separation of concerns without the network overhead.

// Instead of calling a UserService over HTTP:
event(new UserRegistered($user));

// Listeners handle notifications, analytics, billing.
// Decoupled. Can be queued. Same process.

The One Real Reason to Split

Extract a service when a specific component has genuinely different scaling needs, different deployment cadence, or separate team ownership. Not before.

Spotify has hundreds of services. They also have hundreds of teams. The architecture followed the org chart. Conway's Law is not theory.

Build the monolith. Make it clean. Split it when you actually have to.