Depth understanding of micro-analysis service (under)

Depth understanding of micro-analysis service (under)

Dangdang Dangdang ~ ~ slightly lower half to go directly to the theme, you can also concerned about my micro-channel public number Java Zhou person can receive some of the manufacturers of the interview for free

Service framework and governance

Micro-service lot of time, we need to have governed. Usually a good micro service framework 14 divided into the following section. As shown below. This is the opening said, a lot of things involved in micro-services, some start-ups and business immature product is not suitable, the cost is relatively high.

At present, micro-services framework that is better Alibaba DUBBO, and abroad is the spring cloud, you can go look.


Depth understanding of micro-analysis service (under)



Monitoring system

Monitoring is an important part of the micro-management services. Generally divided into the following four layers. As shown below.


Depth understanding of micro-analysis service (under)



Content Monitoring is divided into five parts: Log Monitoring, Metrics Monitoring (service call), the call chain monitoring, alarm systems and health checks.

Log monitoring, commonly used in China is ELK + KAFKA to achieve. Health checks and Metrics, like spring boot will bring their own. Nagios is a good open source monitoring framework.

Trace call chain monitoring

Call chain monitoring is designed to track the path-dependent and service issues before micro-positioning. For example Ali Hawkeye system. The main principle is that the child node id record information of the parent node.


Depth understanding of micro-analysis service (under)



The figure is more popular call chain monitoring framework.


Depth understanding of micro-analysis service (under)



Limiting fuse micro services

A hypothesis services depend on the service B and service C, and B and C service service may continue to rely on other services, will make the call to continue the link is too long. If on the link to A is called one or several sub-service is not available or delay high, it will result in a call A service request is blocked, blocked requests would occupy too consume system threads, io, etc. resources, when more and more of such requests, more and more computer resources occupied, it will cause the system bottleneck, causing other requests also is unavailable, eventually leading to the collapse of the business system.

For general service depends on protection mainly in two ways: fusing and current limiting. The most popular is the fuse Hystrix framework.

The figure is Hystrix breaker diagram:


Depth understanding of micro-analysis service (under)



Limiting the API zuul limiting method may be employed.

Docker container deployment technology & continuous delivery pipeline

With the popularity of micro-service container technology is also appropriate pay attention to it all. Container technology mainly to solve the following two questions:

1: Environmental Compliance issues. For example java-jar / war package deployment will depend on environmental issues (speaking version of the system, jdk version of the problem).

2: image deployment problems. For example java, rubby, nodejs etc. distribution system is not the same, each environment are very cumbersome to deploy again, the use of docker mirror, shields such problems.

The figure is a complete deployment process Docker containers.


Depth understanding of micro-analysis service (under)



More importantly, with so many clustered environment migration services, copying is also very easy, simply select the good service each corresponding Docker service mirroring, configure access address each other will be able to quickly build out a new identical clusters.

Container scheduling and publishing system

Currently container-based scheduling platform Kubernetes, mesos, omega. Below is a simple architecture diagram of mesos.


Depth understanding of micro-analysis service (under)



Below is a complete release container system


Depth understanding of micro-analysis service (under)



Like this article, you can point to the author likes to point at attention, will share Java-related articles every day!

Remember to focus on me oh, will occasionally presented benefits, including consolidation of interview questions, learning materials, source code, etc. ~ ~


Guess you like

Origin blog.51cto.com/14456091/2427394