← All patterns
System architecture · Architecture pattern

Microservices

Choose independently deployable business boundaries and explicit service-owned state.

The problem

Different teams need to evolve inventory and checkout independently, but shared tables and long call chains couple releases and failures.

When it fits

Business boundaries and team ownership justify the network, consistency and operational cost of independent services.

The whole architecture

Architecture diagram

A gateway routes to business services with owned data, asynchronous integration and shared operational capabilities.

Blue arrows are API/data calls; purple arrows are events. Operational bars apply across the architecture.

100%

Scroll to pan. Select a component for its role.

microservices architectureA gateway routes to business services with owned data, asynchronous integration and shared operational capabilities. Blue arrows are API/data calls; purple arrows are events. Operational bars apply across the architecture.Business servicesService-owned dataclients → gateway: requestgateway → catalog: catalog APIgateway → checkout: checkout APIcatalog → catalog-data: owned datacheckout → inventory: reserve stockcheckout → checkout-data: owned datainventory → inventory-data: owned datacheckout → messages: eventsrequestcatalog APIcheckout APIowned datareserve stockowned dataowned dataeventsClients reach service contracts through an optional gateway.ClientsWeb / mobile / APIA gateway routes requests; each service still owns its authorization and invariants.API gatewayAuthentication / routingThe service owns its catalog data and deployment boundary.Catalog serviceCatalog capabilityCheckout coordinates its business operation through service contracts.Checkout serviceCheckout capabilityInventory independently enforces its reservation rules.Inventory serviceStock reservationAnother service should use the catalog contract rather than these tables.Catalog dataService-owned storeLocal commits are separate from inventory transactions.Checkout dataLocal transactionA data store belongs to its service boundary; technology is an implementation choice.Inventory dataLocal transactionAsynchronous integration still needs retained progress, identity and schema policies.MessagingEvents / independent subscriptionsTelemetry helps follow an operation across independently failing services.ObservabilityLogs, metrics, traces and correlationIndependent services require operational ownership.Operations & deliveryDeployment, discovery, health, scaling and recovery

Select a component, or focus it and press Enter, to read its role.

Walk through the design

Follow one operation

Select a step to highlight its participants. This conceptual walkthrough is separate from challenge scoring.

Each service calls its own data store. The service-to-service edge represents a contract; SQL nodes in the practice canvas remain shards, not automatic service ownership.

Checkout serviceActive in this stepCheckout dataActive in this stepInventory serviceActive in this stepInventory dataWaiting
Step 1 of 3

Accept a checkout command

Checkout owns the command and its local state; inventory owns availability decisions.

Trade-offs to make explicit

  • Independent deployment requires compatible contracts and operational ownership, rather than simply drawing more app boxes.
  • Service-owned state makes local invariants clear while cross-service operations need a coordination and recovery policy. A modular monolith can remain a simpler choice.

Failure modes to plan for

  • A slow dependency can exhaust a caller’s resources without timeouts and bounded concurrency.
  • Writing another service’s tables bypasses its invariants. A chain of successful local writes is not one cross-service ACID transaction.
Before you build

Explain your decision

Which boundary deserves independent deployment, and what would fail if its owner became unavailable?

Use Plan & estimate inside practice to record your assumptions and trade-offs.

Connect concept to practice

Related challenges

Browse challenges →

These links open the original challenges. Existing round unlocks, completions and points apply.

One provider stalled; the others still deliver

Related practice in dependency isolation. The canvas pools app capacity and does not score per-service ownership, app-to-app traffic or independent deployments.

Open challenge →

Further reading

Microsoft · Microservices architecture ↗

Original PractiseGrid explanations and conceptual diagrams, with primary references for further study. Dedicated scored exercises can be added as coverage grows.