Monolith or microservices

System design Mid-level Python 3.13+ PostgreSQL 17+ Reviewed By Best Latest Apps

Pick the fix

A 5-person startup plans 12 microservices on day one. Best advice?

Options
Hint 1 of 1

What does each extra service cost a small team?

Choose an answer, then open Show answer below to check it.

Show answer

Answer: A Build a modular monolith with clear module boundaries; extract services when there's a concrete need

Correct. Keeps speed now and options later.

Microservices pay off when teams need to deploy separately or parts need to scale differently. A 5-person team pays the distributed-systems cost without those benefits, while modules keep a later split cheap.

Why not the others?
  • B Go ahead; microservices scale better. Scale isn't the problem yet; operational cost is.
  • C Use one big file with no modules. Boundaries still matter.
  • D Use 12 services sharing one database. Coupled and distributed at once.

30-second answer

Usually a modular monolith: one deployable with clear internal modules and boundaries. It's simpler to build, test, deploy and debug, and transactions just work. Microservices pay off when separate teams need to deploy independently, or parts need very different scaling or reliability, but they add network failures, distributed data, versioning and much more operational work. Extract a service when a module's boundary is proven and there's a concrete reason.

Practise saying it · 30 s. No recording, just a timer

Monolith or microservices?

Say your answer out loud, then check which of these points you covered:

  • Modular monolith first
  • Split for teams or scaling needs
  • Costs of distribution
  • Own your data
  • Strangler fig

Deep dive

Conway's law: system structure tends to mirror team structure.

Each service owning its data is what makes services independent; a shared database couples them.

Strangler fig: route traffic for one capability to a new service, piece by piece.

A distributed monolith (services that must deploy together) is the worst of both.

Common mistakes

  • Microservices for a team of four.
  • Services sharing one database schema.
  • Splitting by technical layer instead of business capability.

Senior take & follow-ups

Default to modular monolith, list real reasons to split and the costs, then how to extract.

Follow-up questions

Think of your answer first, then open the hint.

  1. What's a distributed monolith?

    Show hint

    Separately deployed services that can't change independently.

  2. How do you migrate gradually?

    Show hint

    The strangler fig pattern.

Suggest a fix if something here is wrong or out of date.