Micro Design Services - reading notes (a)

What is a micro service

Micro small and self-service is some of the work of the service.

1 small and focused

Micro-service applications on a single principle of responsibility to an independent service to determine the boundaries of the service in accordance with the scope of business, a service focused on a range of business and avoid the code base is too large. In general, a micro-services should be able to complete reconstruction within two weeks, but not blindly pursue small, the smaller the scope of a micro-business services, the more the benefits of independence brought the entire system required management services the more.

2 autonomy

A micro-service is a separate entity, can be deployed individually on PAAS (Platform as a service platform as a service), we should try to avoid the deployment of multiple services on the same machine, both to communicate over the network between service calls strengthen the isolation between services, avoid tight coupling. Exposing service API (Application Programming Interface, an application programming interface), communication between the service via the API. Implementation of the API and the consumer should not be coupled in the micro-service scheme, a micro any service problems, will not affect other functions.

The main benefit of two micro services

Technical heterogeneity

In the micro-system services, each service can use the new micro-technologies to develop, so each micro service can select the language best suited to their business, to develop the database, unlimited other modules. For example, the article is more suitable for document database module, and for dealing with the relationship between friends, using the map database might be more suitable.

elasticity

In the single application, if the service fails, it causes all features are not available, monolithic applications in order to avoid such a situation, usually the same application deployed on different servers. The micro-processing services are born with this service degradation and services, although micro-services have good flexibility, but still be treated with caution, in distributed systems and networks caused by machine.

Spread

Large single application as a whole can only be extended, even if only a small part of a performance problem, it needs to be extended to the entire system. If you use a micro service, you may only need to expand services to extend the service to run on less frequently used in smaller, less powerful hardware.

Simplify deployment

Even if only in a single application to modify a single line of code, but also need to redeploy the entire application. Significant impact of this deployment, very risky, and the responsible person will not dare publish. So the frequency of deployments to much lower, but the greater the gap between the two releases, the greater the likelihood of problems.

Structure and match

Micro-service architecture framework and organizational structure may be a good match to avoid excessive code base. To obtain ideal team size and productivity.

Composability

In the past monolithic applications emphasize the main benefit is easy to reuse existing functionality, but in the micro-service, according to different purposes, people can use the same function in different ways. Now we need to consider the type of applications, including Web, mobile phone APP, mobile end Web, Tablet applications, wearable device.
In the micro-service system, the system will open many interfaces for external program, when circumstances change, you can build applications in different ways.

Optimization of alternative

Want reconstruction costs monomer applications is high, you want to delete a module may lead to other problems and micro service, we want to reconstruct or remove a micro service, obstruction faced by small.

Guess you like

Origin www.cnblogs.com/zhangjun0204/p/11260312.html