DEV Community

Discussion on: When are microservices appropriate?

Collapse
 
cubikca profile image
Brian Richardson

I think there's both logical and techincal reasons to take on the additional work at the beginning.

From a DDD perspective, domains often align nicely with the expected complexity of a microservice. The ability to containerize the entire service including storage and infrastructure allows you to make new atoms and manage complexity better. From a security perspective, different services have different security requirements. If you package a service's identity with the deployment, it is very easy to provide cloud role permissions. From an application code perspective, aligning to the DDD provides traceability to the high-level design, reducing defects in the long run. From a management perspective, different services can be owned and developed by different teams.

I agree that a monolith is easier to develop. But in my experience, it is not so easy to maintain, or to bring in new people on such projects. If you have any or all of the requirements I mentioned above (traceability, DDD, management), I believe that microservices are an appropriate solution. If these requirements aren't there, a monolith is by far easier to manage in the short-term.