IICTPIICTP

Blog / Guides

Answers1 November 20266 min read

Monolith vs microservices: which should you choose?

A monolith is one deployable application, and microservices split a system into many small services that deploy independently. Neither is better in general. Microservices trade simpler code boundaries for harder operations, so they pay off mainly when separate teams need to change and scale parts of a system independently.

In this post
  1. What does a monolith offer?
  2. What do microservices offer?
  3. What do microservices cost?
  4. What is a modular monolith?
  5. How do you decide?
  6. How do you move from one to the other?
  7. Sources and further reading

What does a monolith offer?

Calls between parts are ordinary function calls, so they are fast, easy to debug and consistent within a transaction. There is one thing to deploy and monitor. For a small team or a young product, that simplicity is a real advantage.

What do microservices offer?

Teams can deploy their service without coordinating a release of everything, and each service can scale and use the technology that suits it. A failure can be contained to one service if the boundaries and fallbacks are designed well.

What do microservices cost?

Every call becomes a network call that can be slow or fail, so you need timeouts, retries and monitoring. Data is split, so consistency becomes harder. You also need strong deployment, observability and ownership practices, or the system becomes a distributed monolith.

What is a modular monolith?

It is one deployable application whose code is divided into modules with clear interfaces and separate data ownership. It keeps most of the simplicity of a monolith and makes later extraction of a service much easier, so it is a sensible default for many teams.

How do you decide?

Ask whether independent teams are being slowed by shared releases, whether parts of the system have very different scaling needs, and whether you have the operational maturity to run many services. If the answer to the first two is no, stay modular and simple.

How do you move from one to the other?

Do it gradually. Identify a boundary that matches a business capability, put an interface in front of it, and move it out behind that interface, as in the strangler approach. Avoid a rewrite that must match every feature before it ships.

Sources and further reading

  1. Newman, S. Building Microservices. O’Reilly, 2nd ed. 2021.
  2. Fowler, M. Strangler Fig Application. martinfowler.com.

IICTP is an independent technical credentialing body.

Keep reading

← All posts

Where do you stand?

Find the credential that fits the work you do.