Right-Sizing and Identifying Service Boundaries



1. Why Right-Sizing Microservices is Important


2. Domain-Driven Design (DDD) Sizing

Domain-Driven Design (DDD) is a strategic approach that helps break down systems into meaningful bounded contexts based on business logic.

Steps for DDD-based Microservice Sizing
Example of DDD in Microservice Sizing

Consider an e-commerce system with several subdomains: Product Catalog, Order Management, and Customer Support. Each subdomain is a candidate for a microservice. For instance:

  • Product Catalog Service: Handles products, categories, pricing, and availability.
  • Order Management Service: Manages customer orders, payments, and shipping.
  • Customer Support Service: Deals with customer queries and complaints.
Pros of DDD-based Sizing
Cons of DDD-based Sizing
Challenges & Solutions

3. Event Storming Sizing

Event Storming is a collaborative workshop technique where business events drive the discovery of service boundaries. The goal is to understand how the system behaves based on domain events.

Steps for Event Storming-based Microservice Sizing
Example of Event Storming Sizing

For an e-commerce system, domain events might include:

  • "Product Added to Cart"
  • "Order Placed"
  • "Payment Processed"

Using Event Storming, you might group events such as "Order Placed" and "Payment Processed" together, forming the basis for an "Order Management" service. "Product Added to Cart" might belong to a "Shopping Cart" service.

Pros of Event Storming Sizing
Cons of Event Storming Sizing
Challenges & Solutions

4. Conclusion: Choosing Between DDD and Event Storming

Example of microservices for bank application