4 Identifying and scoping microservices

 

This chapter covers

  • Scoping microservices for business capability
  • Scoping microservices to support technical capabilities
  • Scoping microservices to support efficient development work
  • Managing when scoping microservices is difficult
  • Carving out new microservices from existing ones

To succeed with microservices, it’s important to be good at scoping each microservice appropriately. If your microservices are too big, the turnaround on creating new features and implementing bug fixes becomes longer than it needs to. If they’re too small, the coupling between microservices tends to grow. If they’re the right size but have the wrong boundaries, coupling also tends to grow, and higher coupling also leads to longer turnaround. In other words, if you aren’t able to scope your microservices correctly, you’ll lose much of the benefit microservices offer. In this chapter, I’ll teach you how to find a good scope for each microservice so it stays loosely coupled and efficient to work with.

The primary driver in identifying and scoping microservices is business capabilities, the secondary driver is supporting technical capabilities, and the tertiary driver is efficiency of work. Following these drivers leads to microservices that align nicely with the list of microservice characteristics from chapter 1:

4.1 The primary driver for scoping microservices: Business capabilities

4.1.1 What is a business capability?

4.1.2 Identifying business capabilities

4.1.3 Example: Point-of-sale system

4.2 The secondary driver for scoping microservices: Supporting technical capabilities

4.2.1 What is a technical capability?

4.2.2 Examples of supporting technical capabilities

4.2.3 Identifying technical capabilities

4.3 The tertiary driver for scoping microservices: Supporting efficiency of work

4.4 What to do when the correct scope isn’t clear

4.4.1 Starting a bit bigger

4.4.2 Carving out new microservices from existing microservices

4.4.3 Planning to carve out new microservices later

4.5 Well-scoped microservices adhere to the microservice characteristics

4.5.1 Primary scoping to business capabilities leads to good microservices

4.5.2 Secondary scoping to support technical capabilities leads to good microservices

4.5.3 Tertiary scoping to support efficiency of work