Chapter 3. Identifying and scoping microservices
This chapter covers
- Scoping microservices for business capability
- Scoping microservices to support technical capabilities
- 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 too long. 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 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 they stay loosely coupled.
The primary driver in identifying and scoping microservices is business capabilities; the secondary driver is supporting technical capabilities. Following these two drivers leads to microservices that align nicely with the list of microservice characteristics from chapter 1:
- A microservice is responsible for a single capability.
- A microservice is individually deployable.
- A microservice consists of one or more processes.
- A microservice owns its own data store.
- A small team can maintain a handful of microservices.
- A microservice is replaceable.