A service boundary assigns responsibilities and scope. A useful division keeps services loosely coupled at design time and makes most changes local to one service. section 1.3.4 section 7.5.2
When choosing boundaries:
- Keep performance-critical operations within one service, even if that makes it larger. section 1.3.4
- Avoid excessive fine-grained services, which add network overhead and runtime coupling. section 1.3.4
- Plan for breaking API changes to require incremental versioning and coordinated client migration. section 7.5.2
Order-history query
A Delivery Service cannot filter orders by menu item because it does not know their contents. A query like this may call for API composition, CQRS, or boundaries that make the query local to one service. section 12.2.4
Figure 1.13 Some, but not all, operations in a microservice architecture will span multiple services. Distributed operations are more complicated to design because services are process and transaction boundaries. This creates numerous design challenges since the network is not free, it’s unreliable, and not all services are guaranteed to be simultaneously available. You must also use an unfamiliar transaction model known as eventual consistency.
Use the figure to see why operations spanning service boundaries face network, availability, and transaction challenges. section 1.3.4
