当前位置:网站首页>From monomer structure to microservice architecture, introduction to microservices
From monomer structure to microservice architecture, introduction to microservices
2022-07-06 07:59:00 【Frog at the bottom of the well】
Monomer architecture VS Microservice architecture
1.1 Starting from the single architecture
One project corresponds to one archive package (war)
, This war package The work of the project includes all the work
can . We become this application as a monomer application , That is what we often call monomer architecture ( One
war try to do everything all by oneself ).
A detailed description : It's in one of our war In bag , It gathers various functions and resources , such as JSP、JS、CSS、HTML etc. .
The business includes our user module , Order module , Payment module and so on .
Single structure diagram
1.3 Summary of advantages and disadvantages of monomer structure
advantage :
- Simple and clear architecture , No, ” tart “ The problem needs to be solved .
- Development , test , Simple deployment ( Especially the operation and maintenance personnel You'll wake up laughing when you're asleep )
shortcoming :
- As the business expands , The code is getting more complicated , The quality of the code is uneven ( The level of developers varies ), Will let you submit code every time , Modify every little bug All are heart startling and gallbladder trembling -- be deeply Of .
- Slow deployment ( Due to the monomer Architecture , Complex functions ) Imagine the next one coming from 200W+ The speed of code deployment .
- High expansion cost , According to the monomer architecture diagram Suppose the user module is a CPU intensive Module ( It involves a lot of operations ) So we need to replace something more powerful CPU, And our order module is a IO Dense modules ( It involves a lot of reading and writing disks ), Then we need to replace more powerful memory and efficient disks . But in our monomer Architecture Cannot be extended for a single function module , Then you need to replace something more powerful CPU More powerful memory Better disks The price goes up slowly .
- Hindering the development of new technology … Like our web Architecture module from struts2 Migrate to springboot, Then it will become disastrous
2、 Microservices and microservice architecture
2.1 Definition of microservices
The core of microservice is to integrate the traditional stand-alone application , Separate stand-alone applications into one by one according to business service , Complete decoupling , Each service provides a specific function , A service does only one thing , Similar process , Every service can Separate deployment , You can even own your own database . Such a small service is Microservices .
For example, traditional stand-alone e-commerce applications , A mall system has
Order / payment / stock / logistics / integral
Equal module ( Understood as aservcie
)We according to the business model To split , It can be divided into
Order service
,Payment services
,Inventory service
,Logistics services
,Points service
If you don't split it , My non core business points module There's something big bug Cause system memory overflow , Cause the whole system to go down .
If after splitting , It's just that my point and micro service is not available , The core function of my whole system is still Be able to use .
A big man has a good summary of the definition and understanding of microservice , Here I just quoted some simple language to understand microservices , For more information, please refer to the boss blog :http://blog.cuicc.com/blog/2015/07/22/microservices/
2.2 Expansion of stand-alone architecture and microservice
// To be continued , Have time to continue writing
边栏推荐
- 数据治理:数据质量篇
- Data governance: 3 characteristics, 4 transcendence and 3 28 principles of master data
- 1015 reversible primes (20 points) prime d-ary
- 继电反馈PID控制器参数自整定
- 让学指针变得更简单(三)
- Epoll and IO multiplexing of redis
- Get the path of edge browser
- Position() function in XPath uses
- [cf gym101196-i] waif until dark network maximum flow
- Asia Pacific Financial Media | designer universe | Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers
猜你喜欢
继电反馈PID控制器参数自整定
Pangolin Library: control panel, control components, shortcut key settings
Description of octomap averagenodecolor function
Codeforces Global Round 19(A~D)
Mex related learning
2.10transfrom attribute
. Net 6 learning notes: what is NET Core
Database basic commands
"Designer universe" Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers | national economic and Informa
好用的TCP-UDP_debug工具下载和使用
随机推荐
Artcube information of "designer universe": Guangzhou implements the community designer system to achieve "great improvement" of urban quality | national economic and Information Center
Oracle time display adjustment
数据治理:误区梳理篇
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Asia Pacific Financial Media | art cube of "designer universe": Guangzhou community designers achieve "great improvement" in urban quality | observation of stable strategy industry fund
Vit (vision transformer) principle and code elaboration
[KMP] template
链表面试题(图文详解)
Apache middleware vulnerability recurrence
xpath中的position()函数使用
二叉树创建 & 遍历
Get the path of edge browser
Asia Pacific Financial Media | designer universe | Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers
让学指针变得更简单(三)
Nft智能合约发行,盲盒,公开发售技术实战--合约篇
opencv学习笔记九--背景建模+光流估计
PHP Coding Standard
Iterator Foundation
上线APS系统,破除物料采购计划与生产实际脱钩的难题
edge浏览器 路径获得