17 / 25 · Service boundaries

Microservices

Microservices split a system into independently deployable business services. The useful boundary is ownership of a capability and its data, not an arbitrary number of small functions or servers.

Follow a ticket-booking example to decide which service owns the catalog, seat reservations, payments and notifications. Compare these boundaries with a modular monolith before choosing an architecture.

What you will practise

  • Choose business ownership
  • compare synchronous/asynchronous work
  • justify a service boundary

Before you start: Business invariant, transaction and network call.

About 4 minutes · offline-generated English female narration · captions included. Diagrams are conceptual; timings are illustrative.

Download MP4Captions

Listen without the videoDownload audio

The same pre-recorded voice as the video. Starting audio pauses the video, and starting the video pauses audio.

Chapters and full transcript

Let us understand microservices. A school has a library team, accounts team and transport team. Each owns a different responsibility and communicates through clear requests. If every tiny task needs a meeting with every team, work becomes slower. More teams are helpful only when their boundaries reduce coordination rather than create it. Microservices split a system into independently deployable business services. The useful boundary is ownership of a capability and its data, not an arbitrary number of small functions or servers.

Follow the normal path. Name business responsibilities before drawing services. Catalog descriptions and authoritative seat reservations have different ownership and correctness requirements. Each capability owns its protected state and exposes contracts. Giving every service write access to every table defeats much of the intended independence. SeatSpot may separate booking, catalog and notifications when team ownership, scaling or deployment needs justify it. A small team can often start with a modular monolith and preserve those boundaries without network overhead.

Now change one condition. The booking workflow contacts payments. That call can time out or succeed remotely while its response is lost; it is not a local transaction. A common misunderstanding is this: Every function should become a microservice. Fine-grained network boundaries can add latency, coordination and partial failures without useful autonomy. Think about this. Catalog, booking and payment must deploy together after every change. Are they operationally independent? Pause the video and make your prediction. Probably not yet. Inspect shared schemas and contracts before calling separate processes independent services.

Let us reason with a concrete example. A confirmation requires catalog lookup, seat reservation, payment and notification. Putting all four behind sequential network calls increases latency and failure combinations. Notification can be asynchronous; reservation/payment need an explicit state machine and reconciliation. Start with the required invariant and workflow. Separate a capability only when the autonomy benefit outweighs the distributed coordination cost. These figures are teaching examples, not production guarantees.

Turn the idea into a design decision. Confirmation can publish notification work after reliable business-state coordination. A slow email provider need not occupy the booking request indefinitely. Old and new callers may coexist. Test contract compatibility and observe version-specific errors instead of requiring every service to deploy in lockstep. When you try the practice task, look for this result. Separate deployment earns its complexity only when ownership and autonomy are useful.

Check your understanding. For a small team, a modular monolith may satisfy the same domain boundaries with fewer moving parts. Choose services from requirements rather than fashion. Here is a challenge. A two-person team has low traffic and no independent deployment needs. Must it use microservices? Pause before the answer. No. A modular monolith can keep clear domains with simpler transactions and operations. Revisit extraction when measured scaling, ownership or release constraints justify it. For an interview, discuss contracts, state machines and asynchronous notification. Say what you would measure, not only which tool you would buy.

Start with an everyday picture

A school has a library team, accounts team and transport team. Each owns a different responsibility and communicates through clear requests. If every tiny task needs a meeting with every team, work becomes slower. More teams are helpful only when their boundaries reduce coordination rather than create it.

Why SeatSpot needs this

SeatSpot may separate booking, catalog and notifications when team ownership, scaling or deployment needs justify it. A small team can often start with a modular monolith and preserve those boundaries without network overhead.

Trace one step at a time

Move through the diagram at your pace. Teal paths are active; unavailable components are labelled.

ClientCatalog ownerBooking ownerPayment ownerNotificationowner

Step 1 of 6 · Boundaries before boxes

Find the capabilities

Name business responsibilities before drawing services. Catalog descriptions and authoritative seat reservations have different ownership and correctness requirements.

Read all six mechanism steps
  1. Find the capabilities

    Name business responsibilities before drawing services. Catalog descriptions and authoritative seat reservations have different ownership and correctness requirements.

  2. Own the data

    Each capability owns its protected state and exposes contracts. Giving every service write access to every table defeats much of the intended independence.

  3. Cross a network boundary

    The booking workflow contacts payments. That call can time out or succeed remotely while its response is lost; it is not a local transaction.

  4. Decouple optional work

    Confirmation can publish notification work after reliable business-state coordination. A slow email provider need not occupy the booking request indefinitely.

  5. Deploy compatibly

    Old and new callers may coexist. Test contract compatibility and observe version-specific errors instead of requiring every service to deploy in lockstep.

  6. Justify the complexity

    For a small team, a modular monolith may satisfy the same domain boundaries with fewer moving parts. Choose services from requirements rather than fashion.

Pause and make a prediction

Catalog, booking and payment must deploy together after every change. Are they operationally independent?

Answer aloud or write your reasoning in the lesson notes before revealing the explanation.

Correct a common misunderstanding

Claim to question: Every function should become a microservice.

Better explanation: Fine-grained network boundaries can add latency, coordination and partial failures without useful autonomy.

Draw a booking ownership map

A paper or whiteboard task. No cloud account or paid infrastructure is required.

  1. Assign catalog, booking, payment and notification ownership.
  2. Mark which operations must protect seat allocation.
  3. Compare a modular monolith with extracting one justified capability.

Check what you can explain

This is your self-check, not an automated grade. Try again without the diagram tomorrow.

0 of 3 goals checked. Choose one remaining idea to practise next.

These checkboxes reset when you leave. Use your saved lesson notes and completion marker to record lasting progress.

Teach it back

Without looking, explain what this component changes, what it does not solve and what happens if it fails. Use the animation to check your explanation, then switch to Engineering.

Try it before viewing the solution

A two-person team has low traffic and no independent deployment needs. Must it use microservices?

Check one key idea

A strong reason to split a service is:

Your explanation and interview notes

Saved only in this browser when storage is available. Export a backup from the course page before clearing browser data or moving devices.

Loading your local notes…

Official references and next reading

The explanation, fictional examples and animations are original teaching material. Vendor behavior depends on the specific product/version; use its documentation before deploying.