.NET Architecture & System Design Interview Question #106
What is service decomposition?
Microservices, API Gateway, Service Communication & Event-Driven Architecture Mid-Level Intermediate
Quick Interview Answer
Service decomposition is the process of deciding how a larger system should be divided into independently owned capabilities or services.
Detailed Explanation
Service decomposition is the process of deciding how a larger system should be divided into independently owned capabilities or services.
Good boundaries usually follow business capabilities and data ownership rather than technical layers. A service should have meaningful cohesion internally and minimal reasons to coordinate synchronously with many other services for every operation.
Code Example
Poor:
UI Service
Business Service
Database Service
Better:
Orders
Payments
Inventory
Shipping