Micro Services Architecture Analysis

What is a micro-service architecture

Refers to micro-services and service data split by a unified system into several independent sub-autonomous services, each service is only achieve a particular functionality (e.g., login service is implemented log associated logic), the service interface in the form of an application or other service providing function data (e.g. call log service order service login state check determines whether the user login interface), which press solutions split service system called micro-architecture.

Micro Features Architecture

Micro-service refers to the development of a small group but business function service, each service has its own processing and lightweight communication mechanism, can be deployed on a single server or multiple micro-services also refers to a variety of loosely coupled, there some bounded context of service-oriented architecture. That is, if each service to be modified at the same time, then they are not micro-services, because they are tightly coupled together; its main feature is component-based, loosely coupled, autonomous, decentralized, reflected in the following areas :

A group of small service 
service granularity is smaller, and each service is packaged for the operational capacity of a single responsibility, and focus on doing one thing.

Independent deployment operation and expansion of 
each service can be independently deployed and running in a process. This operation and deployment can give flexible code organization and publishing systems rhythm, fast delivery and makes it possible to respond to change.

Independent development and evolution of 
technology selection flexibility, legacy system without technical constraints. Suitable business issues can be independently choose the right technology evolution. Adopt a language-independent API for integration between service and service. Relatively monomer architecture, micro-architecture is more service-oriented business innovation of an architectural pattern.

Teams independent and autonomous 
team responsible for the entire life-cycle services, working in a separate context, own their own management decisions, without the need for a unified command center. Between teams and team cohesion through loose tribal communities.

Micro-service architecture diagram is as follows

As shown above, the micro-service architecture is split into the following basic components

1. Registration Center

Registry records service dispatch and routing information service interface, gateway load balancing based on scheduling information service registry configuration. Service configuration information registry by specific service report, but also by the registry initiative to specific service queries for large clusters suggestions reported by the specific services their information to the registry, by the registry initiative to query the service configuration information under normal circumstances, so specific services do not care registry, only their configuration information query interface.

2. External Gateway

External Gateway is a centralized internal services exports, decided to external traffic, traffic will be distributed to the appropriate service, and load balancing strategies.

3. Internal Gateway

Interior Gateway, provide for the internal address of the centralized service calls, network isolation, not open. Add an internal gateway mainly call each other to facilitate unified service rooms, as well as service interface access control. Many architects believe that internal service calls should be straight with each other the way, should not transit through the gateway. But I believe that the internal gateway and service are in the network environment, add a centralized scheduling gateway performance is not a problem, better access to and control interface load balancing, or internal services and access to care for load balancing and other non-operational issues.

4. Configuration Center

Configuration management center is a common configuration, such as cache configuration, database connection configuration, a message queue connection configuration etc., to avoid problems repeat business service configuration, the complicated, dispersion simplified configuration, centralized.

5. Monitoring Platform

Monitor the entire cluster to run state services, such as traffic conditions, provide exception alarm, so that visual supervision of abnormal nodes.

6. Log platforms

Business centralized log management, can be centrally managed and analyzed statistics and other message queue by kafka log collection business services.

7. cache clusters

High frequency data cache, effectively reduce the burden on the database, and to enhance the stability of the system concurrent processing capability.

8. Database Cluster

Business data stored in the database eventually fall, but also the source of cached data, different business service must have its own database cache, do the hot and cold data separation, regularly dump historical data to reduce the amount of data online.

9. Business Services

Under the micro-service system architecture is composed of a group of small business clusters together to complete, according to business systems and data will be split into different services, each service specific functions, independence autonomy in management, horizontal expansion.

Reproduced in: https: //my.oschina.net/xungen/blog/3054573

Guess you like

Origin blog.csdn.net/weixin_34092455/article/details/91869827