![]() |
Created by Diego Freitas
over 7 years ago
|
|
Question | Answer |
Definição: | suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API and independently deployable by fully automated deployment machinery. |
Motivação: | our system will be easy to change in an environment where requirements constantly change, saving time, resources and money. The reality is that software needs to embrace change to be more competitive, give our users what they want and gain efficiencies; all the things that matter most to business and the users of our software |
Aspectos Chave: | These systems also have to be independently deployable by automated deployment machinery, along with a facility of centralized management. Newer technologies like Node.js, Docker, and Git enable Microservices with DevOps easily rather than older technologies like Java or C#. |
Principios: | Encapsulation Automation Business Domain Centric Decentralization Independence Fail-Safe Observable |
Encapsulation: | Services should hide how they work and do a single thing and do it well. The encapsulation is based on the business function of the service that it encapsulates; the functional requirements. |
Automation | Services should use automation which keeps management and operational support efficient. Employing large numbers of small services can become a mess if you do not embrace automation. |
Business Domain Centric | each service should align to your bounded context within a domain model for this to make sense in the domain and in the large service architecture. |
Decentralization | Every service should be decentralized and autonomous so that each service can operate on its own schedule and priorities. Each service, if independent, can be updated and deployed as fit. Service versioning and backwards compatibility is crucial because systems will be dependent on other systems; we can implement features and prioritize services separately. |
Independence | Services should be independent of each other but to enable this similar to decentralization, we must implement versioning and backwards compatibility. Being able to deploy a service separately is the main goal. |
Fail-Safe | Enterprise systems typically need to be smart, in that they fail in a way that doesn’t break things in unpredictable ways. Anticipate failure in everything, along with validation of input and validation of data we send downstream. |
Observable | each service should be observable through logging and correlation of messages. A common pattern here is to aggregate data for all services and collect and analyze for operational support. |
Scalability Cube | |
X-Axis scaling | Simply horizontal duplication. This is the typical scalability used today, having server farms and machines with a load-balancer. |
Y-Axis scaling | functional decomposition which is a core principle of Microservices. This scales by splitting out different things like individual Microservices. |
Z-Axis scaling | data partitioning – scale by splitting similar things, or partitioning databases, is a common usage scenario. An example of data partitioning would be a phone book with two databases A-K and L-Z. Splitting out data into two databases makes it easy. If request needs data for a person with last name starting with B, it goes to first partition, otherwise the second partition. It is generally acceptable practice for scaling very large databases. |
There are no comments, be the first and leave one below:
Want to create your own Flashcards for free with GoConqr? Learn more.