This notorious blog post by Martin Fowler throws an interesting perspective on microservices vs. monolith:

(...) don't even consider microservices unless you have a system that's too complex to manage as a monolith

The chart below illustrates his point:

  • With low complexity, use monolity to maximize productivity
  • With high complexity, use microservices to maximize productivity

Mololith vs. Microservices CurvesSource: Martin Fowler - Microservice Premium

So the question is: how do we judge where an application falls on this chart in terms of complexity?

There are measures of code complexity, such as McCabe and Halsteads.

But what if one is just starting new application development. There's no code yet.

How would you judge whether it's better to start monolith or microservices?

Cover image credit: [Markus Spiske](https://unsplash.com/@markusspiske?utmsource=unsplash&utmmedium=referral&utmcontent=creditCopyText)_

This post is also available on DEV.