Originally posted on samueleresca.net
Microservices are small, autonomous services that work together. –Sam Newman, Thoughtworks
So, what is a service? A service is a software that...
- is responsabile for holding, processing, and distributing a particular kind of information within the scope of the system;
- deploy and runs are indipendent;
- communicate with consumers and other services, presenting informations using conventions and contracts;
- handles failure conditions;
A system is a federation of services, aiming to provide a solution for a well-defined scope. The solution scope may beÂ motivated by the business, technology, law or other criterias.
There are three main concepts about microservices:
- Â Approach is ideal for big systems: size of a system is relative, what does it mean big? Big is not referred to the size of our system, ratherÂ it is referred to the capability of scaling;
- Architecture is goal-oriented:Â microservice architecture isn’t about identifying a specific collection of practices, rather it is an acknowledgment that software professionals are trying to solve a similar goal using a particular approach;
- Microservices are focused on replaceability and loose coupling system: replace a component is better than maintaining and changing it;
Microservice applications share some important characteristics. First of all, they are small in size and*decentralized.Â *Decentralized means that your application will no longerÂ beÂ managed by a central body.
Microservices are alsoÂ autonomously developed and independently deployable. Each team develop aÂ single microservice and manage the deployment.Â Less centralization results in fewer bottlenecks and less resistance to change, while more autonomy means that changes and decision can be made much quicker.
Microservices architecture does not refer to a particular set of technology, process, or tools. Instead, you will need to stay focused on the goal itself. Â The real value of microservices is realised when we focus on two key aspects: speed and safety. Finding an effective balance between them at scale. The desire for speed is a desire for immediate change and ultimately a desire for adaptability. Speed of change gets a lot of attention in cases studyÂ about microservices architecture, another important keyword is change safety. After all, “speed kills and in most software shops nobody wants to be responsible for breaking production. Finally, another aimÂ of the microservices architecture is the idea of solving problems that arise when software gets too big.
The microservice architectural style was defined based on common patterns observed across a number of pioneering organizations. These organizations did not consciously implement a microservices architecture. They evolved to it in pursuit of specific goals. Adam Trenaman, the Senior Vice president of Engineering @Glit, speaks about micoservices architecture in this article. MicroservicesÂ have given toÂ GlitÂ the following benefits:
- Lessens dependencies between teams - resulting in faster code to production;
- Allows lots of initiatives to run in parallel;
- Supports multiple technologies/languages/frameworks;
- Enables graceful degradation of service;
- Promotes ease of innovation through 'disposable code' - it is easy to fail and move on;
Some services require high availability, but are low volume, and it is the opposite for other services. A microservice approach allows us to tune for both of these situations, whereas in a monolith it’s all or nothing.
The speed key aspect of microservices architecture provides the following business value:
- AgilityÂ allows organizations to deliver new products, functions, and features more quickly;
- **ComposabilityÂ **reduces development time and provides a compound benefit through reusability over time;
- ComprehensibilityÂ of the software system simplifies development planning, increases accuracy, and allows new resources to come up to speed more quickly;
- Independent deployabilityÂ of components gets new features into production more quickly and provides more flexible options for piloting and prototyping;
- **OrganizationalÂ **alignment of services to teams reduces ramp-up time and encourages teams to build more complex products and features iteratively;
- Polyglotism: permits the use of the right tools for the right task, thus accelerating technology introduction and increasing solution options;
The safety aspect described earlierÂ provides following business value:
- Greater efficiency in the software system reduces infrastructure costs and reduces the risk of capacity-related service outages;
- Independent manageability contributes to improved efficiency, and also reduces the need for scheduled downtime;
- Replaceability of components reduces the technical debt that can lead to aging, unreliable environments;
- Stronger resilience and higher availability ensure a good customer experience;
- Better runtime scalability allows the software system to grow or shrink with the business;
- Improved testability allows the business to mitigate implementation risks;
In conclusion, we haveÂ introduced some of the concerns that first-time implementers often have. We also introduced the microservices architecture process, a goal-driven approach to building adaptable, reliable software. The balance of speed and safety at scale is key to understanding the essence of microservices. For more informations about microservices architecture: