Let us discuss some of the key benefits of microservices. I think all the good things about SOA definitely applies to microservices. In addition there are few which needs to be highlighted. Whether you are building a new solution from scratch or refactoring an existing solution, some of the below benefits are key with microservices that I wish to highlight from my experience.
With agile teams and squads, one can really separate out a specific functionality to be delivered by a smaller team. A team size of 8-12 is ideal who can build, test as well as support the operations of a service. The team can truly be autonomous as long as they stick with the microservices principle. Different microservices can be owned by different teams and the overall goal can drive the organization structure at the same time empowering each team to make their decisions on functionality and implementation.
They can develop their code independently using whatever technology they feel is right for delivering their function. This way different part of systems can use different technology stack if needed for better performance. But multiple technologies comes with an overhead - operational understanding of multiple technology stacks. This overhead can be easily addressed with some sort of governance across the teams. So technology heterogeneity or polyglot programming is one essential benefit of microservices.
When we give independent responsibility of a service to a team, they are also responsible for making it available all the time and should be able to scale it independently as per the need. Thus resiliency and independent scaling becomes one key benefit. Microservices can provide resiliency by introducing redundancy.
When it comes to ease of deployment or moving things around – it is very convenient at a microservices level. One part of the system can move to another machine or to another cloud while rest of the service could stay on-prem. Or even you could try different variations of hybrid cloud – develop in the cloud and run production on-prem or develop inhouse and run production on cloud.
With microservices – we build a new solution by combining things or Composability is a key differentiator. Not only does it allow for reuse of functionality but it provides not a way you could plug in or plug out capabilities as per your need. If you have a better implementation for a functionality, we can seamless replace the existing microservice with the new one.
Most importantly all of these allows to deliver new capabilities at the speed required by the business.