当前位置:网站首页>What is the dry goods microservice architecture? What are the advantages and disadvantages?
What is the dry goods microservice architecture? What are the advantages and disadvantages?
2022-06-29 02:12:00 【Intelligence Podcast】

Microservice architecture definition
Microservice architecture is an architecture style and architecture idea , It advocates us to build on the traditional software application architecture , Split the system business into more fine-grained services according to functions , Each service split is an independent application .
These applications provide public API, Can independently undertake the responsibility of external service , The software service entity developed by this way of thinking is “ Microservices ”, And a series of architectures built around the idea of microservice ( Including the development of 、 test 、 Deployment, etc. ), We can call it “ Microservice architecture ”.
According to the definition of micro Service Architecture , The way to split traditional single architecture into micro service architecture .
The traditional monomer architecture is divided into micro service architecture :

As can be seen from the above figure , Microservice architecture has integrated the order service in the traditional monomer architecture 、 Commodity services and user services are divided into independent services , Each of these services is an independent application , You can access your own database , These services provide public API, And services can call each other .
Be careful :
Microservice and microservice architecture are two different concepts . Microservices emphasize the size of services , It focuses on a point , Microservice architecture is an architectural idea , It is necessary to comprehensively consider the software system as a whole .
The advantages of microservice Architecture
Compared with the traditional single application architecture , Microservice architecture has many advantages , The specific performance is as follows :
1. Controllable complexity
Microservice architecture decomposes applications at the same time , Avoid the endless accumulation of original complexity . Each microservice focuses on a single function , And clearly express the service boundary through well-defined interfaces . Because of its small size 、 Low complexity , Each microservice can be completely controlled by a small-scale development team , Easy to maintain high maintainability , And improve the development efficiency .
2. Independently deployable
Because microservices have independent running processes , So each microservice can be deployed independently . When a microservice changes , No need to compile 、 Deploy the entire application . An application composed of microservices is equivalent to a series of parallel publishing processes , Make publishing more efficient , At the same time, it reduces the risk to the production environment , Ultimately reduce application lead time .
3. Flexible technology selection
Microservices architecture , The selection of technology is diversified . Each team can be based on their own service needs and the current situation of industry development , Free to choose the most suitable technology . Because each microservice is relatively simple , When the technology needs to be upgraded , The risk is low , Even completely refactoring a microservice is feasible and easy .
4. Easy fault tolerance
When a component in the architecture fails , Under the traditional framework of single process , Faults are likely to spread in the process , The whole application is not available . In the microservices architecture , Faults are isolated in a single service . If the design is good , Other services can be retried 、 Implementation of application level fault tolerance by stable degradation and other mechanisms .
5. extensible
A single service application can also achieve horizontal expansion , This extension can be realized by completely copying the whole application to different nodes . When different components of the application differ in the expansion requirements , Microservice architecture reflects its flexibility , Because each service can be expanded independently according to actual needs .
6. Function specific
Each microservice has its own business logic and adapter , And a microservice generally only completes a specific function , For example, goods and services only manage goods 、 Customer service only manages customers, etc . In this way, developers can fully focus on the development of a specific function , Without thinking too much about other , So as to improve the development efficiency .
In addition to the above benefits , Microservice architecture also has many benefits , Due to limited space , Here is not a list , But the benefits of microservice architecture can be seen , Using microservices can well solve the problems in the traditional monomer Architecture .

The shortcomings of microservice Architecture
In addition to the various advantages mentioned above, microservice Architecture , There are still some deficiencies , The specific manifestations of these deficiencies are as follows :
1. Developers have to deal with the complexity of creating distributed systems
① development tool ( or IDE) It is oriented to building traditional single application , Does not provide full functional support for developing distributed applications .
② Testing is more difficult . In the microservices architecture , There are many services , Each service is an independent business unit , Services interact mainly through interfaces , How to ensure the normal of dependence , Is the main challenge of testing .
③ Developers must implement the communication mechanism between services .
④ When implementing use cases across multiple services , Need to face the difficulties of using distributed transaction management .
⑤ Implement use cases across multiple services , Requires careful coordination between teams .
2. The complexity of deployment
When deploying and managing , The operation of a system composed of many different service types is more complex , This will require the development of 、 The test and operation and maintenance personnel have the corresponding technical level .
3. Increase memory consumption
The microservice architecture is replaced by multiple service instances 1 A single application instance , If each service runs on its own JVM in , How many service instances are there , How many instances will have memory overhead at runtime .
Microservice architecture and SOA The difference between
Through the above , I believe you have a certain understanding of the microservice architecture . Careful students may have such a question , Microservice architecture and SOA It's all a split of a single architecture , What's the difference between them ? Here is a table to compare the differences between the two .
Microservice architecture and SOA The difference between :




The above is the dry goods content shared by broadcast girl
I hope it helped you
Black horse programmer
Cumulative culture 30 More than 10000 high-quality IT personnel
8 Hot enrollment in College
The basic class only needs 28 element , Scan code for free consultation

Consult online courses
You can add broadcast girl directly 1 Yes 1 Answer


Free access to popular tutorial resources
reply 【 Claim resources 】 led 《 Dark horse 8 Subject summary course 》
reply 【1026】 led 《SpringBoot2 full set 》
reply 【 Reggie takeout 】 led 《 Reggie takeout program tutorial 》
reply 【mysql1】 led 《Mysql Beginner to master 》
reply 【 Graduation project 】 led 《Java Graduation project 》
Get more tutorials :heiniu526
( Reply to corresponding key below the official account. , You can get it )
↓↓↓

边栏推荐
猜你喜欢

In simple terms, server intrusion prevention

Analysis of advantages and disadvantages of environment encryption and transparent encryption

【Redis】数据介绍 & 通用命令 & String类型

SAP ui5 beginner tutorial 22 - development and use of filter

SAP ui5 beginner tutorial Part 23 - sorting sort and grouping Group trial version of list control

Live broadcast preview | can SQL also play industrial machine learning? Mlops meetup V3 takes you to the bottom!

OculusRiftS与Unity.UI的交互(1)-总览

如何成为一名高级数字 IC 设计工程师(4-5)脚本篇:Shell 脚本实现的文件比较操作

How to prevent virus

Oculusrifts and unity UI interaction (1) - Overview
随机推荐
[redis] sortedset type
Adding, deleting, checking and modifying stack - dynamic memory
[learning notes] subsets and questions
Why is it recommended that you choose the self research company as much as possible
[redis] set type
Ambiguity between 0 and 1
如何成为一名高级数字 IC 设计工程师(6-7)数字 IC 验证篇:DEBUG 技巧
Examen final de troisième année
Who do you want to know when opening a stock account? Is it safe to open an account online now?
Necessary technologies for chip manufacturers (1) Introduction
How to become a senior digital IC Design Engineer (6-7) digital IC Verification: debug skills
Secondary encapsulation of storage (sessionstorage/localstorage) using TS
为什么建议大家尽可能选择自研公司
11 go Foundation: Interface
【Redis】List类型
Analysis of sending principle of OData metadata request for SAP ui5 application
When you complain about the roll, others have quietly begun to prepare for the golden three silver four
Is it safe to contact the account manager online to open an account for stock speculation?
KOA Quick Start
Dialogue with opensea co creation Alex: we still only touch the tip of the iceberg of NFT capability | chain catcher