Skip to content
StackDecode
System Design
11. Microservices ArchitectureAnimated

Bounded Contexts

A boundary inside which one model and language apply.

The idea

The same word (such as "customer") may mean different things in billing and shipping, so each gets its own model.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

InfrastructureApplication ser…Domain servicesDomain model
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Layers wrap the domain model like an onion.

step:
1/4
at:
Domain model
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Find where terms change meaning
  2. 2Draw a boundary
  3. 3Own the model inside
  4. 4Integrate across with explicit contracts

Where it is used

Service boundaries.

Watch out for

Sharing one model across contexts creates coupling.

Related