Video in progress

A small team is starting a new project. Why is jumping straight into microservices often a mistake?

At the start the domain boundaries aren't clear yet, the team is small, and microservice infrastructure (deployment, monitoring, tracing) is expensive. Starting with a well-structured modular monolith and splitting later when needed is usually cheaper.

📖 Answer

The main benefit of microservices is that many teams can work without getting in each other's way, and that you can scale parts separately. A team of 3-4 people doesn't have that problem yet, but the costs arrive immediately:

  • separate CI/CD, configuration, logs and monitoring for each service;
  • calls between services go over the network, so you have to think about timeouts, retries and versioning;
  • a change that touches two services is no longer one commit but two deploys.

The worst mistake is drawing the boundary in the wrong place. If you split into services while the domain is still changing, every new feature means changing 3 services together. People sometimes call this a "distributed monolith": all the pain of microservices and none of the benefit.

I usually recommend a modular monolith: packages split by domain, and modules that don't reach into each other's tables. Pulling one module out into its own service later is then much easier.