当前位置:网站首页>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 )
↓↓↓

边栏推荐
- Cross border information station
- 11-Go基础:接口
- Tiflash compiler oriented automatic vectorization acceleration
- 项目研发,有哪些好用的免费脑图工具软件
- What is stock online account opening? Is it safe to open an account online?
- 如何成为一名高级数字 IC 设计工程师(6-6)数字 IC 验证篇:系统级仿真
- 数字 IC 设计、FPGA 设计秋招笔试题目、答案、解析(2)2021 华为海思(上)
- Live broadcast preview | can SQL also play industrial machine learning? Mlops meetup V3 takes you to the bottom!
- Blog publishing test 2
- B1009 irony
猜你喜欢

Koa 快速入门

KOA Quick Start
![[understanding of opportunity -33]: seeing is not necessarily true. Most of the time,](/img/60/703a5bc3038d28bcf812415032f240.jpg)
[understanding of opportunity -33]: seeing is not necessarily true. Most of the time, "seeing is false"

How to become a senior digital IC Design Engineer (4-2) script: file read / write operation realized by Verilog HDL code

如何成为一名高级数字 IC 设计工程师(4-3)脚本篇:C 语言实现的文件读写操作

如何成为一名高级数字 IC 设计工程师(4-2)脚本篇:Verilog HDL 代码实现的文件读写操作

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

To apply for a test engineer after years, the resume with high scores should be written like this
![[redis] set type](/img/97/0a83016e89316849c01072044f2124.png)
[redis] set type

How to manage device authorization
随机推荐
Is the ETF fund reliable and safe
[redis] data introduction & General Command & string type
Dialogue with opensea co creation Alex: we still only touch the tip of the iceberg of NFT capability | chain catcher
基于 FPGA 的 RISC CPU 设计(4)关于项目的 36 个问题及其答案
How to become a senior digital IC Design Engineer (3-5) tools: Spyglass Technology
Analysis of sending principle of OData metadata request for SAP ui5 application
如何成为一名高级数字 IC 设计工程师(4-2)脚本篇:Verilog HDL 代码实现的文件读写操作
为什么建议大家尽可能选择自研公司
okcc呼叫中心的计费方式哪个最好
I have summarized some experiences from the whole process of R & D platform splitting
在按钮禁用时消除hover效果
[从零开始学习FPGA编程-49]:视野篇 - 芯片是如何被设计出来的?
想请教一下,我在中山,到哪里开户比较好?在线开户是安全么?
Oculusrifts and unity UI interaction (1) - Overview
How does flush open an account? Is it safe to open an account online?
Large scale visual relationship understanding
How to choose source code encryption software
【Redis】数据介绍 & 通用命令 & String类型
[redis] list type
如何成为一名高级数字 IC 设计工程师(6-6)数字 IC 验证篇:系统级仿真