Microservices vs monolith in system design

A monolith is one application deployed as a single unit; microservices split the application into small services that are deployed, scaled and owned independently, each with its own data. Microservices let many teams ship without coordinating every release and let hot parts scale on their own, but they add network failures, distributed data and a lot of operational work. For a small team or a new product, a well-structured modular monolith is usually the better start, with services split out when a clear need appears.

By Published 7 min read

1. The three shapes

A monolith is one codebase built and deployed as one process (often many copies behind a load balancer) with one main database. A modular monolith is still deployed as one unit, but its code is split into modules with enforced boundaries and their own tables, so modules talk through interfaces rather than reaching into each other's data. Microservices are separately deployable programs that each own a business capability and its data and talk over the network through APIs or events. There is a wide spectrum in between, and many real systems are a few large services rather than hundreds of tiny ones.

2. Why interviewers ask about it

Design answers often start with a row of boxes labeled "user service", "order service", "payment service". Interviewers then ask why those boundaries, how the services talk, what happens when one is down, and how an order that touches three services stays consistent. They also like to ask the reverse: when would you not split? A candidate who can argue for a monolith in the right context shows judgment rather than fashion.

3. Side by side

How the shapes compare
Monolith / modular monolithMicroservices
DeploysOne release for everything; a bad change can block all teamsEach service ships on its own schedule
ScalingScale the whole app, even if one part is hotScale only the services that need it
Calls between partsIn-process function calls: fast, reliableNetwork calls: slower, can fail or time out
DataOne database; joins and transactions across modulesDatabase per service; no cross-service joins or transactions
Failure isolationA memory leak can take down everythingA failing service can be contained, if callers handle it
DebuggingOne log stream, one stack traceNeeds distributed tracing and correlated logs
Team fitWorks well up to a moderate number of engineersLets many teams own and ship parts independently
Operational costOne pipeline, one runtime to manageMany pipelines, service discovery, versioned APIs, more infrastructure
How the shapes compare. Scroll sideways on a small screen.

4. When each fits

  • Choose a (modular) monolith for a new product whose domain is still changing, a small team, or a system where most operations touch most of the data. Boundaries drawn too early are expensive to move once they are network APIs.
  • Choose microservices when many teams step on each other's releases, when parts have very different scaling or reliability needs (a video transcoder next to a settings page), or when a part needs a different technology or compliance boundary.
  • Split selectively. Extracting the one or two parts with clearly different needs often gives most of the benefit. Advice to start with a monolith and extract services later is common among experienced architects.

5. What distribution costs

Every in-process call that becomes a network call can now be slow, fail, or succeed without the caller knowing. Availability multiplies along a chain of synchronous calls:

0.999 ^ 10 = 0.990   ->  about 99.0% of requests succeed

In a 30-day month (43,200 minutes):
  one service at 99.9%    ->  about 43 minutes of failed requests
  chain of ten at 99.9%   ->  about 430 minutes, roughly 7 hours

(Assumes independent failures; retries, caching and async calls change it.)
Availability of a request that needs 10 services in a chain, each 99.9% available
  • Latency adds up. Sequential calls each add network time and their own tail latency; fan out in parallel where you can.
  • No shared transactions. An order that reserves stock and charges a card across two services needs a saga: a sequence of local steps with compensating actions if a later one fails, usually driven by events.
  • Data duplication. Services keep copies of other services' data they need, updated by events, and accept that the copies lag.
  • Observability. Distributed tracing, correlation IDs and central logs become necessary, not optional.
  • API versioning. Changing a service's contract needs backward compatibility while callers upgrade.

6. Drawing service boundaries

  1. Start from business capabilitiesOrdering, payments, catalog, shipping, identity. Each owns its rules and its data. Avoid splitting by technical layer (a "database service", a "validation service").
  2. Give each service its own dataOther services read through its API or events, never its tables. Shared databases quietly couple services back together.
  3. Check how chatty the boundary isIf two services need many calls to answer one request, the boundary is probably in the wrong place.
  4. Match boundaries to teamsConway's law: systems tend to mirror the communication structure of the organization that builds them. One team per service or small group of services keeps ownership clear.

7. How services talk, and survive each other

Synchronous and asynchronous communication
StyleUse whenCosts
Synchronous (REST, gRPC)The caller needs the answer now: checking a price, authorizing a paymentCaller fails or slows when the callee does
Asynchronous (events, queues)Something happened and others react later: send email, update searchEventual consistency; harder to trace one request end to end
Synchronous and asynchronous communication. Scroll sideways on a small screen.
  • Timeouts on every call, shorter than the caller's own deadline.
  • Retries with backoff and a budget, only for idempotent operations.
  • Circuit breakers that stop calling a failing service for a while and return a fallback.
  • Bulkheads: separate connection pools so one slow dependency cannot exhaust all threads.
  • Load balancing between services, often client-side or through a mesh; see load balancing.

Asynchronous messaging is covered in message queues vs pub/sub and the wider pattern in event-driven architecture.

8. Migrating: the strangler fig

Rewriting a monolith from scratch into services usually takes far longer than planned while the old system keeps changing. The strangler fig pattern migrates piece by piece: put a routing layer in front of the monolith, build one capability as a new service, route its traffic there, and repeat. The monolith shrinks until what is left is small enough to keep or retire. Extract the part with the clearest boundary and the strongest reason first, and move its data along with it.

9. How it shows up in common prompts

Service boundaries that hold up in interviews
PromptReasonable splitKeep together
UberRider app API, location ingestion, matching, trips, paymentsTrip state and its transitions in one service
Payment systemPayment API, ledger, risk checks, payoutsLedger writes and balance checks
Notification systemIntake, preferences, per-channel sendersA channel's retry logic and its provider client
URL shortenerOften one service plus analytics pipelineCreation and redirect; splitting adds little
Service boundaries that hold up in interviews. Scroll sideways on a small screen.

10. Mistakes to avoid

  • A distributed monolith. Services that must deploy together or share a database have the costs of both and the benefits of neither.
  • Splitting by layer. A "data service" in front of every table turns each request into a chain of calls.
  • No timeouts. One slow service backs up every caller until the whole system stalls.
  • Cross-service transactions with two-phase commit everywhere. Prefer sagas and idempotent steps.
  • Starting with dozens of services for a small team. The operational load lands before the benefits.

11. How to talk about it in the interview

  • Say why you split: team independence, scaling differences or failure isolation.
  • Name each service's data and who may write it.
  • Mark each arrow as synchronous or asynchronous.
  • Explain one cross-service flow end to end, including failure handling.

Fictional example

Arguing for a modular monolith
Interviewer
You're building a clinic booking product with a team of six. Microservices?
Candidate
Not yet. I'd build a modular monolith with modules for patients, scheduling, billing and notifications, each owning its own tables and talking through interfaces. One deploy pipeline, one database, transactions where scheduling and billing meet.
Interviewer
What would make you split?
Candidate
Notifications is the first candidate: it has spiky load around reminder times and depends on outside providers. If those spikes start to affect booking latency, I'd extract it behind a queue. Because the module already owns its data and has a clean interface, that extraction is mostly moving code.

Practicing with Natively

Architecture questions like this are judgment calls, and the reasoning is what gets graded. Practicing with Natively running, the conversation is transcribed and talking points can appear for each follow-up, so in review you can check whether you justified the split, named data ownership and covered a failure case. Capture a screenshot of your box diagram and it can explain or question it. The transcript and notes stay available for later.

Questions people ask

When should you use microservices instead of a monolith?

When many teams block each other's releases, when parts of the system have very different scaling or reliability needs, or when a part needs its own technology or compliance boundary. For a small team or a young product, a modular monolith is usually simpler.

What is a modular monolith?

An application deployed as one unit whose code is split into modules with enforced boundaries and their own data. It keeps in-process calls and one database while making a later split into services much easier.

What are the main disadvantages of microservices?

Network calls that add latency and can fail, no transactions or joins across services, more complex debugging that needs tracing, API versioning, and much more deployment and infrastructure work.

How do you split a monolith into microservices?

Gradually, with the strangler fig pattern: put a routing layer in front, rebuild one business capability as a service with its own data, route its traffic there, and repeat, starting with the part that has the clearest boundary and the strongest reason to move.

Where to go next

Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.

Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.

Keep reading

Put it on your own machine.

A live-conversation assistant that runs locally. Your conversations stay on your machine.

macOS 12+ · Windows 10/11

© 2026 Natively AI Private Limited

Source-available under the Natively Personal Use Source License v1.0 · IP geolocation by DB-IP