Architecturebusiness capabilityservice decompositiondata ownership

Service boundary

Definition

A service boundary defines the responsibilities and data a service owns exclusively; everything outside it interacts through published APIs or events rather than shared tables or internal code.

In practice

Good boundaries follow business capabilities (ordering, billing, shipping), so the logic and data that change together live in one service. Most user requests and most feature changes then stay inside one service, which keeps call chains short and releases independent.

Cutting by entity (a Customer service, an Address service) or by layer turns one operation into a chain of synchronous calls, and every dependency multiplies the failure odds: ten services at 99.9% give about 99.0%. A shared database erases the boundary even if the code is separate. Judge a boundary by how often requests and changes cross it.

Example

Checkout owns cart, pricing and order creation; it needs the customer's shipping address, so it keeps a local copy updated from AddressChanged events instead of calling the customer service on every request.