DEV Community

Service Granularity: When Is a Microservice Really “Micro”?

Originally, "micro" in microservices was misunderstood to mean small size rather than clear boundaries. A microservice's size is less important than its independence, data ownership, and clear contracts. The essence of a microservice is its autonomy and ability to be developed and deployed independently. Domain-Driven Design's concept of bounded contexts helps identify natural service boundaries. Splitting functionality too finely, like modeling workflow instead of the domain, leads to overly small services. Each service incurs costs in deployment, network overhead, and operational complexity. Signs of healthy microservice granularity include clear domain ownership and independent deployability. Conway's Law highlights that service granularity should align with team structures and communication patterns. It is often better to start with coarser-grained services and evolve them over time as understanding deepens. Ultimately, "micro" in microservices refers to autonomy and focus, not just small code size.
favicon
dev.to
dev.to
Create attached notes ...