AR2: Architecture styles: monoliths, modular monoliths, microservices and events

Lesson 1 of 5 · reading 15–25 minutes; practice and project time is on the module page

The monolith

🎯You'll be able to

Describe a monolith, explain why it's often the right start, and recognise when one is becoming hard to change.

🏠The everyday picture

A family-run restaurant has one kitchen where everyone cooks everything. It's simple and fast while the menu is small. When the menu triples, cooks bump into each other and one burnt pan stops the whole service.

📘What it really is

📝A worked example

Input: RasoiRoute's figures and the starter's npm run deps.

Steps:

  1. Deploys: 1.5 a week, 22.2% rolled back, every one shipping all modules.
  2. Failures: 42.3% of incidents start in notifications, and orders wait for messages.
  3. Coupling: 5 internal reaches and one cycle joining orders, invoices and notifications.
  4. Team: 14 engineers in 3 teams, a size many monoliths serve well.

Expected output: the problems are risky deploys, a failure that spreads, and tangled modules, not the size of the code or the team.

🌍Where it's used

📝Case scenario

A payments start-up began with microservices because "that's how big companies do it". With six engineers and eleven services, half of each week went on deploys, monitoring and debugging calls between services. They merged back into one well-structured application and shipped faster.

🖱️Try it

Pick a system you know and list its warning signs from the list above. Success: each sign has evidence, not a feeling.

⚠️Common mistakes

🛠️For your project

Project 1's first option is "keep the monolith as it is". Score it fairly: it has real strengths (test 3 asks for good and bad points).

✅Quick check

What is a monolith?

Show the answer

One application built and deployed as a single unit, with all its parts in one process.

Why can a monolith be the right choice?

Show the answer

It's simpler to build, test, deploy and debug, and one transaction can update several parts together.

← BackAR2
ProLearners Assist