# Choosing a modular monolith or microservices

> Choose between a modular monolith and microservices using deployment, scale and ownership needs. Follow the decision for a catalogue image resizer.

Source: https://cueapril.com/knowledge/explanations/modular-monolith-or-microservices
Updated: 2026-12-02
Index: https://cueapril.com/llms.txt

## When is it worth extracting a microservice from a modular monolith?

A modular monolith keeps distinct parts of an application in one deployment. Extract a service when there is a concrete need for independent deployment, scaling or ownership, and the proposed boundary can support that independence.

## Look for a boundary inside the application

Find the public operations of the candidate module. Check which callers use them, who owns its data and whether callers write directly to its tables. A module that already hides its internal representation gives a team a practical starting point for extraction.

## Ask what would change at release time

An extracted service adds a network boundary and another component to operate. Consider a consumer running yesterday’s version when the provider deploys today. Walk through an unavailable provider, a slow reply and a schema change. If both sides always need a coordinated release, the proposed split still needs work.

- A clear scaling need might be a CPU-intensive job that competes with interactive requests.
- A clear release need might be an independently owned component waiting on unrelated deployments.
- An interface used only inside one process can still give teams a valuable design boundary.

## Worked example: Deciding whether image processing needs its own service

A catalogue module and image resizer share one application. Measurements show that resizing large uploads delays ordinary catalogue requests. Before splitting them, the team checks that the catalogue can display a pending image and tolerate a delayed result. The public behaviour during that delay becomes a contract both components can verify.

Adapted by Cue April from The Engineering Handbook v1.0.0 by Tenhaw (© 2026 Tenhaw LTD). The examples and pull request checks are Cue April adaptations.

[Tenhaw on monoliths and microservices](https://github.com/Tenhaw/engineering-handbook/blob/10d618fde978727e419a524606f351721b0b1d23/02-architecture.md#monolith-vs-microservices) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

## Try it on your pull request

On your own PR, identify a caller that crosses the proposed boundary and check what users see if the response is late.

[Try Cue April on your repository](https://app.cueapril.com/sign-up/?next=%2Fquality-start)

Create an account, connect your repository and review the test plan.

## Related reading

- [How to write an architecture decision record](https://cueapril.com/knowledge/how-to/write-an-architecture-decision-record)

- [How to verify a consumer-driven contract](https://cueapril.com/knowledge/how-to/verify-a-consumer-contract)

- [The test pyramid and testing trophy explained](https://cueapril.com/knowledge/explanations/test-layers-and-tradeoffs)

[Browse the Knowledge base](https://cueapril.com/knowledge)
