当前位置:网站首页>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
边栏推荐
- [t31zl intelligent video application processor data]
- Hackathon ifm
- Solution: intelligent site intelligent inspection scheme video monitoring system
- Solution: système de surveillance vidéo intelligent de patrouille sur le chantier
- Description of octomap averagenodecolor function
- Go learning notes (3) basic types and statements (2)
- WebRTC系列-H.264预估码率计算
- Step by step guide to setting NFT as an ens profile Avatar
- Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
- Data governance: Data Governance under microservice architecture
猜你喜欢
Leetcode question brushing record | 203_ Remove linked list elements
NFT smart contract release, blind box, public offering technology practice -- jigsaw puzzle
It's hard to find a job when the industry is in recession
23. Update data
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
Golang DNS write casually
Epoll and IO multiplexing of redis
08- [istio] istio gateway, virtual service and the relationship between them
Codeforces Global Round 19(A~D)
[非线性控制理论]9_非线性控制理论串讲
随机推荐
Vit (vision transformer) principle and code elaboration
MFC 给列表控件发送左键单击、双击、以及右键单击消息
C # display the list control, select the file to obtain the file path and filter the file extension, and RichTextBox displays the data
实现精细化生产, MES、APS、ERP必不可少
Artcube information of "designer universe": Guangzhou implements the community designer system to achieve "great improvement" of urban quality | national economic and Information Center
ROS learning (IX): referencing custom message types in header files
07- [istio] istio destinationrule (purpose rule)
In the era of digital economy, how to ensure security?
Type of data in energy dashboard
Parameter self-tuning of relay feedback PID controller
Key value judgment in the cycle of TS type gymnastics, as keyword use
【Redis】NoSQL数据库和redis简介
Go learning notes (3) basic types and statements (2)
Notes on software development
链表面试题(图文详解)
Iterator Foundation
Cf1036c class numbers solution
数字经济时代,如何保障安全?
[cf gym101196-i] waif until dark network maximum flow
Sanzi chess (C language)