ResourceInformation

Library β€Ί System Design

🧩 System Design

Monolithic vs Microservices, Explained With Moving Pictures

Library Β· 18 November 2026 Β· 8 min read

Almost every app you use, from shopping sites to banking apps, is built in one of two ways: as one big program (a monolith) or as many small programs that work together (microservices). In this guide you'll watch both styles in action: how they handle a new update, a huge sale and a crash, and which one you should pick.

1. A restaurant vs a food court

Picture two ways to feed a crowd:

  • 🍽️ One big restaurant (monolith): one kitchen cooks everything (starters, mains, desserts) and all the cooks share the same fridge. Simple to run, but if the kitchen catches fire, nobody eats.
  • 🏬 A food court (microservices): separate stalls for pizza, noodles and ice cream, each with its own cooks and its own fridge. A host at the entrance sends you to the right stall. If the noodle stall closes, you can still get pizza.

Software works the same way. Here are both, running. Watch the little glowing dots: each one is a request, like a tap on "Buy now".

MONOLITHone app Β· one database Β· one deployπŸ“±YouONE BIG APPπŸ‘€ UsersπŸ›’ OrdersπŸ’³ PaymentsπŸ“¦ CatalogOne shared databaseMICROSERVICESmany small services Β· each owns its data Β· deployed separatelyπŸ“±YouπŸ‘€ UsersπŸ›’ OrdersπŸ’³ PaymentsπŸ“¦ CatalogAPIGateway
Top: one app does everything and shares one database. Bottom: an API gateway sends each request to the right small service, and each service owns its own data.

2. What is a monolith?

A monolithic application is built and deployed as one single unit. The code for users, orders, payments and the product catalog all lives in one project, runs in one program, and usually stores everything in one database.

  • One codebase: everything is in one place, so it's easy to find and change.
  • One deploy: you build it once and ship it as one package.
  • One database: every part can read any data directly.

"Monolith" sounds old-fashioned, but it isn't a bad word. Most successful products, from small startups to some very large companies, started as a monolith, and many still are.

3. What are microservices?

With microservices, the app is split into small, independent services, each doing one business job: a Users service, an Orders service, a Payments service and so on.

  • Each service runs as its own program and can be updated on its own.
  • Each service owns its data. Others must ask it, rather than reading its database directly.
  • Services talk to each other over the network, using web APIs or message queues.
  • An API gateway (the "host" of the food court) receives requests from your phone and routes them to the right service.

4. Shipping an update

Say there's a small bug in the payment page. Watch what has to be released in each style:

MONOLITHfix one line in Payments β†’ rebuild, test and release the whole app✏️1 small fixπŸ‘€ UsersπŸ›’ OrdersπŸ’³ PaymentsπŸ“¦ Catalogv1v2 βœ“4 / 4parts releasedMICROSERVICESfix Payments β†’ release only the Payments serviceπŸ‘€ UsersservingπŸ›’ OrdersservingπŸ’³ Paymentsv1 Β· servingupdating…v2 βœ“ servingπŸ“¦ Catalogserving1 / 4releasedThe other three services keep running, untouched.
Monolith: even a one-line fix means rebuilding, testing and releasing the whole app. Microservices: only the Payments service is released.

This is the biggest reason large companies move to microservices. When hundreds of developers share one monolith, every release has to bundle everyone's changes together, and one team's bug can delay everyone. With microservices, each team can release its own service whenever it's ready, sometimes many times a day.

5. Handling a big sale

It's sale day and ten times more people are placing orders. Browsing and payments are only a little busier. How does each style cope?

MONOLITHsale day: Orders get 10Γ— traffic β†’ copy the WHOLE appApp copy 1UsersidleOrdersbusy πŸ”₯PaymentsidleCatalogidleApp copy 2UsersidleOrdersbusy πŸ”₯PaymentsidleCatalogidleApp copy 3UsersidleOrdersbusy πŸ”₯PaymentsidleCatalogidleπŸ’° You pay for 3 full copies, but only Orders was busyMICROSERVICESsame sale β†’ add copies of just the Orders serviceπŸ‘€ UsersπŸ›’ Orders #1πŸ›’ Orders #2πŸ›’ Orders #3πŸ’³ PaymentsπŸ“¦ CatalogπŸ’° You only pay for extra Orders copies
To scale a monolith you run more copies of the entire app. With microservices you add copies of only the busy service.

Both can handle the sale. The difference is efficiency: copying the whole monolith also copies parts that weren't busy, which costs more servers and memory. Microservices let you scale exactly the part under pressure.

6. When something breaks

Now imagine a bug in one part goes badly wrong, for example it uses up all the memory and crashes the program:

MONOLITHa crash in one part can take the whole app downπŸ“±βœ•πŸ‘€ UsersπŸ›’ OrdersπŸ’³ PaymentsπŸ“¦ CatalogπŸ’₯ bug!πŸ’₯ App crashedevery part goes down with it😒Nobody can shopMICROSERVICESone service fails β†’ the rest keep workingπŸ“±πŸ‘€ UsersπŸ›’ OrdersπŸ’³ Payments⭐ RecommendπŸ’₯ downβ›”APIGatewayπŸ™‚Shopping worksonly β€œRecommended”is hidden
In a monolith every part runs in the same program, so one crash can stop everything. With microservices the broken service is cut off and the rest keep working.

That red β›” is a circuit breaker: when a service keeps failing, the others stop calling it for a while instead of waiting and piling up. The shop simply hides the "Recommended for you" section until it recovers. This idea of failing in a small, contained way is called fault isolation.

Fair warning: microservices don't stop failures by magic. If a critical service like Payments goes down, checkout still breaks. They just make it possible to keep the damage small, if the system is designed for it.

7. The hidden cost: talking over the network

So far microservices look like the winner. But splitting an app has a price, and it's paid every time two services talk:

INSIDE A MONOLITHparts talk with a function call, in the same memoryπŸ›’ OrdersπŸ’³ Payments⚑ instantwell under a microsecondBETWEEN MICROSERVICESservices talk over the network, which takes time and can failπŸ›’ OrdersπŸ’³ Payments🌐networkβœ• lost! retrying…⏱ millisecondsthousands of times slower,and it can fail
Inside a monolith, parts call each other instantly. Between microservices, every call crosses the network: it's much slower, and sometimes a message is lost and must be retried.

That network gap brings a list of new problems you don't have in a monolith:

  • Slower calls: one page might need answers from five services, and every hop adds delay.
  • Partial failures: you need timeouts, retries and circuit breakers everywhere.
  • Data spread out: an order and its payment live in different databases, so keeping them in sync is harder.
  • Harder debugging: one request may travel through ten services. You need tools like distributed tracing and central logs to follow it.
  • More to run: dozens of services to deploy, monitor, secure and pay for.

8. Side by side

MonolithMicroservices
Built asOne app, one codebaseMany small apps
DatabaseUsually one shared databaseEach service owns its own data
ReleasingWhole app at onceEach service on its own
ScalingCopy the whole appCopy only the busy service
A crashCan take down everythingCan be contained to one service
Speed insideInstant function callsSlower network calls
Getting startedFast and simpleSlow, needs lots of setup
Best forSmall teams, new productsMany teams, large systems

9. The middle path: a modular monolith

There's a popular in-between option. A modular monolith is still one app with one deploy, but its inside is divided into strict modules (Users, Orders, Payments) that only talk through clear, well-defined doors. You keep the simplicity of one app, and if one module ever needs to become its own service, it's already cleanly separated. Shopify, one of the largest online shopping platforms, is well known for taking this route with its main app.

10. Real-world stories

  • Amazon started as one big program. In the early 2000s it broke the site into many small services owned by small teams, so they could move faster. This shift later helped shape Amazon Web Services.
  • Netflix suffered a major database corruption in 2008 that stopped DVD shipments for days. That pushed it to move to the cloud and rebuild as hundreds of microservices, a move it completed around 2016.
  • Amazon Prime Video showed it can go the other way too. In 2023 its engineers wrote that they merged a video-quality monitoring tool from many separate distributed parts into a single application, and cut that tool's infrastructure cost by about 90%.

The lesson: neither style is "better". Each is a tool, and good teams pick the one that fits their problem today.

11. Which one should you pick?

Tick everything that's true for your project and watch the needle move:

MonolithModular monolithMicroservices

A good rule of thumb many experienced engineers follow: start with a well-organised monolith, and split out a service only when you feel real pain that microservices would fix.

Key takeaways

  • A monolith is one app, one deploy and usually one database. It's simple and fast to build.
  • Microservices split the app into small services that are released, scaled and failed independently.
  • Microservices trade simplicity for flexibility, and add network delays, partial failures and much more to operate.
  • A modular monolith gives you clean boundaries without the network cost.
  • Choose based on your team size and real problems, not on what's trendy.

Quiz: test yourself

1. A shop needs 10Γ— capacity for orders only. Which style lets it scale just that part?

Microservices. You add copies of the Orders service only. A monolith has to copy the whole app.

2. What does an API gateway do?

It's the front door: it receives requests from apps and browsers and routes each one to the right service.

3. Why are calls between microservices slower than inside a monolith?

They travel over the network instead of being a direct function call in the same memory.

4. A 3-person startup is building its first app. What's usually the best start?

A (modular) monolith. It's quicker to build and far easier to run. Split later if you need to.

5. What is a circuit breaker?

A safety switch: when a service keeps failing, callers stop calling it for a while so the failure doesn't spread.

Two new visual guides every week

Plus animated tech explainers on YouTube and Facebook.

More from the Library