当前位置:网站首页>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 03:56:00 【Blue92120】
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 :

边栏推荐
- 要不是和阿里P7聊过,我也不知道自己是个棒槌
- 《运营之光3.0》全新上市——跨越时代,自我颠覆的诚意之作
- Data statistical analysis (SPSS) [8]
- [tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (III)
- Kingbase export table structure
- MySQL Varcahr to int
- 分享 60 个神级 VS Code 插件
- 在命令行登录mysql数据库以及查看版本号
- Preliminary construction of SSM project environment
- 大神们 在富函数的open中从mysql连接池里取连接 连接池初始化是20个 如果富函数的并行度是1
猜你喜欢

数据库和缓存如何保持一致性

Go implements distributed locks

20款IDEA 神级插件 效率提升 30 倍,写代码必备

Implementation of b+ tree index based on xlsx

人大金仓(KingBase)导出表结构

【TcaplusDB知识库】TcaplusDB技术支持介绍

【TcaplusDB知识库】TcaplusDB-tcaplusadmin工具介绍

Microsecond TCP timestamp

【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(一)
![[tcapulusdb] I wish you all a healthy Dragon Boat Festival!](/img/f8/d790cc38a0e1c4d6c3bd27d7158c4a.png)
[tcapulusdb] I wish you all a healthy Dragon Boat Festival!
随机推荐
Set hardware breakpoint instruction for ejtag under the PMON of the Godson development board
Data collection and management [6]
Logstash starts too slowly or even gets stuck
Data collection and management [12]
Zhai Jia: from technical engineer to open source entrepreneur of "net red"
【TcaplusDB知识库】TcaplusDB-tcapulogmgr工具介绍(二)
Share 60 divine vs Code plug-ins
Data collection and management [7]
智能视觉组比赛流程草案
云原生周报 | Grafana 9正式发布;云原生词汇表中文版现已上线
Yangzhou needs one English IT Helpdesk Engineer -20220216
[tcaplusdb knowledge base] Introduction to tcaplusdb tcapulogmgr tool (II)
DevOps笔记-05:IT行业中BA、SM、PO、PM、PD、Dev、Ops、QA都是什么角色
[tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (III)
Implementation of b+ tree index based on xlsx
[FPGA mathematical formula] use FPGA to realize common mathematical formulas
【C语言】解决 “address of stack memory associated with local variable ‘num‘ returned”
Ling Jing thinks about her own way
Data statistical analysis (SPSS) [4]
[tcapulusdb knowledge base] modify business modify cluster