CURRICULUM PREVIEWRevision 1 · Open for reviewReview the full course
CONNECTING THE PIECES10 min read

Microservices and service boundaries

Trade local calls for independent ownership deliberately.

Before you beginddd-contexts

The problem and the pattern

Separating booking and billing can let teams deploy independently. It also introduces network failures, distributed tracing, versioned contracts, and asynchronous consistency. Start a service boundary around a cohesive capability with a clear owner and an operational reason to separate.

Follow the flow

Make it concrete

This excerpt isolates the concept. Connect it to the booking API as you work through the exercise.

Focused example
text
Booking service owns reservations
Billing service owns charges
Contract: BookingReserved v1
Failure: billing unavailable does not erase the reservation

Trade-offs

  • Independent scaling and releases require independent data ownership.
  • A shared database can recouple supposedly independent services.
  • A modular monolith is a useful baseline for comparing operational cost.

When to avoid it

Avoid splitting services solely by technical layer or to imitate a larger company.

Your turn

Name three costs that appear when a module becomes a service.

Reveal a worked answer

Network calls can fail independently, releases need contract compatibility, and data cannot be updated with one local transaction. Add observability, bounded retries, and a recovery workflow before splitting.

Keep exploring

One more piece connected.

Mark this lesson complete when you can explain the idea.