Microservices
What are microservices?
Indeed, considered as an architecture, is an approach to building an application as a set of independently deployable services that are decentralized, decoupled and autonomously developed. These services are easily maintainable. While a monolithic is build as a single unit of work, microservices break that unit down into a collection of independent units.
A microservice is a specific service that has a single responsibility and works as a one piece in a general domain that in the future will be possible to interact with an other many additional services.
With microservices, developers could be able to work more efficiently in smaller specialized teams, even using different stack technologies and thus increasing decoupled deployments to better company performance.
Characteristics of microservices
Autonomous components
The basic unit of work of a microservices is a component, it can be a package of software, web service, application or a module that can contains a series of related functions.
Components are used from other services to do many activities like a chain of responsibilities. That can provide more functionality to the main system. As a microservice is an independent unit of work, that helps to loosing coupled between other microservices.
Clean interfaces and common protocols
One of the most important aspects is that microservices work as an independent element in a system, so that will help to have a easy and clean contracts between microservices and the clients that consume them.
The communication mechanism between microservices and clients are usually RPC, REST over HTTP or event-based systems, and these mechanisms help to make a better communication standard to do their activities.
CI/CD
Is the combined practices to continuous integration and continuous delivery. The DevOps philosophy takes a main role in the world of microservices.
Let's remember, these are tools and a set of automated processes that allow developers and operations professionals to collaborate on building and deploying code to a production environment.
Benefits of using microservices
Agility
As the teams are small, is easier to work between stakeholders.
Scaling
Since microservices are distributed elements, at any time could be increase their resources.
Frequent releases
A main aspect and advantage of microservices as and independent unit of work is the frequent and faster release cycles.
Technology flexibility
Microservices architecture don't necessary follow a specific stack of technologies since are most of the time they are modules independents.
Focus in quality
The separation of business into independent microservices means each team will focus on a specific module all of the time.
Reliability
By separating functionality, microservices reduce the risk of breaking an entire application or the code base. It is easy to isolate and fix faults and bugs.
And, what more?
The main challenge is not always making microservices, but knowing when you should use them.