Microservices architecture is a hot topic at the moment.

What are microservices? SOA is a subset of SOA (Service-oriented Architecture) with a smaller granularity. SOA is an architectural style that is an extension of the call/return style. Then microservices are a variant of SOA.

A, SOA





1, coarse particle size

A service can have multiple objects combined to achieve a range of functions.

2. Low coupling

3. Standard interface

Such as WebServices, ESB, and so on. An ESB can be thought of as a middleware that supports multiple transport protocols and multiple message types, like an all-purpose translation.

Second, micro services

It’s just a small service. It is a type of SOA.

1, small, focus on doing one thing

2. Lightweight communication mechanisms are usually RESTful apis based on THE HTTP protocol.

Loose coupling and independent deployment

It can be seen that the biggest characteristic of micro services is small. Because the partition is small enough, it is easy to reuse, arbitrary combination. Also because of small, low coupling, so can be developed independently, independently deployed.

Microservices and SOA

It can be said that microservices are more granular SOA.

But if I understand SOA as an architectural concept, I suspect it may be largely due to system integration. Is to reuse the existing system, avoid repeated development, so the use of SOA, or the old system to add interface, or new system development interface, the integration of old and new systems.

So SOA tends to integrate existing systems, a remedy; Microservices architecture, on the other hand, is active in business segmentation from the beginning.

Microservices are generally deployed together with programs and databases, which are self-contained and similar to the pearls in the fifth element. When collected, great power can occur.

Four, the advantages and disadvantages of micro services



Advantages: easy to reuse, separate development, separate deployment, automatic deployment

Disadvantages: too much, if not automated deployment, will make dead. And so many services, call each other, how to manage? This creates a complex communication mechanism that requires a series of nanny measures such as registration, supervision, and circuit breakers.

5. Micro-service framework

1. Micro-service framework Because there are too many services, it is difficult to manage, so a number of micro-service frameworks have emerged, which are specially used to manage micro-services, such as registration, supervision and circuit breaker.

Mainstream microservice frameworks:

Spring CLoud
Dubbo
Istio
Copy the code

2. Microservice container Docker K8S

6. Concepts related to micro-services

Cloud native = cloud + Think cloud from the start, with microservices + DevOps + continuous delivery + containerization

Cloud native = microservices + DevOps + continuous delivery + containerization

What is cloud native

I also learned about this micro-service in 2017, and my understanding at that time was like this: micro-service