Skip to content
Ameen Abozaid
MID-061

Microservices introduction

  • 5 Lessons
  • 2 h practice (estimate)
On this page 8 topics

Overview

Topics

  • Benefits
  • costs
  • service boundaries
  • deployment independence

Learn first

2 h of practice (estimate)

Learning outcomes

  1. State the benefits of microservices (independent deployment, scaling, ownership) and their costs (network, consistency, operations).
  2. Explain why a modular monolith is often the better first step.
  3. Apply concrete criteria to decide whether a module should become a service.
  4. Recognize a distributed monolith.

Lessons

  1. 01What microservices promise
  2. 02What they cost
  3. 03The distributed monolith
  4. 04Criteria for extracting a service
  5. 05Demo: walking through the decision for each Shop module

Lab and exercises

Lab

MID-061-LAB1 · Split decision

Outcomes: 1–4 · Time: ~2 h

  1. Collect evidence for each Shop module: load, change frequency, team ownership, data coupling.
  2. Score each module against the extraction criteria.
  3. Decide which modules to extract, if any.
  4. Record the decision as an ADR: context, criteria, decision, consequences, review date.

Acceptance: ADR reviewed; "not extracting" is an acceptable outcome when justified.

Exercises (assessment: ADR review; five exercises)

IDOutcomeTask
MID-061-EX011Make a two-column table of microservice benefits and the conditions under which each really appears.
MID-061-EX021Take one in-process call in Shop and list everything that must be added when it becomes a network call.
MID-061-EX032Write a short argument for starting with a modular monolith for a 6-person team.
MID-061-EX043A colleague proposes "one service per entity" for Shop. Evaluate it with the criteria.
MID-061-EX054Review a description of 5 services that share a database and release together; name the problem and two fixes.
Show solutions
  • EX01 For example: independent deployment needs independent code and data; scaling needs load evidence; ownership needs several teams.
  • EX02 Timeout, retry with backoff, idempotency, error mapping, authentication, tracing, versioned contract, and a partial-failure path.
  • EX03 Fewer moving parts, one deployment, local transactions, refactoring is cheap, boundaries still enforced by tooling; extract later when drivers appear.
  • EX04 Boundaries by entity ignore bounded contexts and create chatty calls and lockstep changes; apply criteria per capability, not per table.
  • EX05 It is a distributed monolith. Fixes: give each service its own data and API; merge back into a modular monolith where boundaries are unclear.

Quiz

Outcomes: O1 benefits and costs · O2 modular monolith first · O3 extraction criteria · O4 distributed monolith.

A self-check for you: nothing is graded, saved or sent anywhere. Choose an answer, then check it. You can try again as often as you like.

  1. 1A true benefit of microservices is:O1
  2. 2A cost of microservices is:O1
  3. 3Replacing a cross-service transaction usually requires:O1
  4. 4Why is a modular monolith often a good first step?O2
  5. 5A valid driver for extracting a service is:O3
  6. 6Before extracting a module you should confirm:O3
  7. 7"Not extracting" as an ADR outcome is:O3
  8. 8A sign of a distributed monolith:O4
  9. 9A common mistake when splitting:O4
  10. 10Splitting "to scale" without data is risky because:O1

Practical part

Five exercises MID-061-EX01 to EX05 plus the lab. Pass: at least four exercises correct and an ADR whose decision follows explicit criteria.

Common mistakes

A service per entity; splitting to "scale" without load data.

Assessment

ADR review.

Career relevance

Decomposition decisions (SRC-008) and migrations (SRB-008).

Type to search levels, phases, modules and lessons.