当前位置:网站首页>Project architecture evolution
Project architecture evolution
2022-06-11 04:22:00 【LoneWalker、】
Monomer architecture :
There are not many users , The project is also unstable

advantage :
- The monomer architecture is simple , Low development cost of small projects .
- The project is deployed on a node , Maintenance is also easier .
shortcoming :
- All functions are integrated in one project , Not easy to develop and maintain for large projects .
- Project modules are tightly coupled , Low single point fault tolerance .
- It is impossible to optimize and expand different modules .
Set up the cluster :
Improve project stability , Increased concurrency tolerance , One of the servers is down , No problem .
But there are some new problems after setting up the cluster , for example ( Including but not just these three ):
- How user requests are distributed to different servers , So as to relieve the pressure of the increase in the number of users .
- After the user logs in successfully , Data sharing .
- When the amount of data is huge , If you go directly to the database to query , slowly , How to improve query efficiency

Can pass Nginx【 Solve the request allocation problem 】、Redis【 Solve data sharing and caching problems 】、Elasticsearch【 Solve the data query problem 】 Technology , Solve the above problems .

Vertical architecture :
The so-called vertical architecture is to split an original application into several unrelated applications , To improve efficiency .
For example, we split a system into user modules 、 Order module 、 Commodity module , Once the order module is accessed too much , Just add the order module node .

Distributed architecture :
Projects are generally divided into controller、service、dao Three layers , In fact, the hardest hit areas that cause the program to slow down may be service perhaps dao layer , The cluster is built for all three layers , The effect is not very good , So it began to evolve into a distributed architecture .

Distributed architecture issues :
problem 1: After using the distributed architecture , The direct communication between servers is synchronous , On some functions that are not core business, I certainly hope it is asynchronous communication , In order to realize the asynchronous communication between servers, there is MQ【RabbitMQ、RocketMQ etc. 】

problem 2: Because there are many modules , And the number of module clusters increases , It will cause other modules to need to maintain various ip Address and other information , The maintainability of the project is extremely low , Extremely high coupling , And it can not achieve the effect of load balancing
There are also technologies that can help us manage service information 【Nacos perhaps Eureka】,【ribbon】 It can help us realize the load balancing of services

problem 3: If there is a problem with the order module , As long as the content of this module is involved, it cannot be used , It may cause the thread pool provided by the service to be exhausted , Nor can it give user-friendly tips
So there is 【Sentinel 】 Technology to solve

problem 4: A large amount of data will make the database unable to store all the contents or respond very slowly when querying data , In the case of high user concurrency , The database is also unbearable .
So it can be based on 【mycat】 Implement database division by database and table

Microservice architecture
Microservice architecture is split again on the basis of distributed architecture , Make each service do only one thing .

problem : Too many modules increase the operation and maintenance cost
solve : use 【docker】 Containerization technology helps us manage
边栏推荐
- Guanghetong won the "science and Technology Collaboration Award" of Hello travel, driving two rounds of green industries to embrace digital intelligence transformation
- JVM (3): classloader classification and parental delegation mechanism
- MySQL stored procedure
- meedu知识付费解决方案 v4.5.4源码
- Cloud broadcast alert, guanghetong helps intelligent camera to build a "river protection" drowning prevention system
- Unity 编辑器扩展 保存位置
- Matter protocol
- JVM (4): active and passive use of classes, internal structure of runtime data area, JVM thread description, PC register
- 游戏数学: 计算屏幕点中的平面上的点(上帝视角)
- The future has come and the 5g advanced era has begun
猜你喜欢

新UI学法减分专业版34235道题库学法减分专业版小程序源码

JVM(5):虚拟机栈、栈异常、栈的存储结果和运行原理、栈内部结构、局部变量表

The live broadcast helped Hangzhou e-commerce Unicorn impact the listing, and the ledger system restructured the new pattern of e-commerce transactions

AI助力,释放法务势能!iTerms合同智审系统重磅发布

Implementation of unity transport mechanism

Eth Transfer

Do you know the difference between mallbook ledger and bank ledger?

Eth relay interface

MySQL lock summary

Unity 物品模型旋转展示
随机推荐
QT日志模块的个性化使用
Protection and bypass of repeated contracting
Image detection related model data format
Overview of guanghetong industrial 5g module product line
Embedded basic interface UART
MySql索引
Eth relay interface
Explain in detail the structure and working principle of the crystal oscillator
ESP series module burning firmware
Esp32 development -lvgl uses internal and external fonts
决策树(Hunt、ID3、C4.5、CART)
Guanghetong officially released the annual theme of 2022 5g Huanxin: Five Forces co drive · Jizhi future
把所有单词拆分成单个字词,删选适合公司得产品词库
Guanghetong LTE CAT6 module fm101-cg, which supports CBRS band, took the lead in obtaining FCC certification
Possible problems with password retrieval function (supplementary)
Market prospect analysis and Research Report of surround packing machine in 2022
数据分析师必知必会的统计学知识
meedu知识付费解决方案 v4.5.4源码
正大国际;做主帐户需要了解什么
Guanghetong officially released the sc126 series of intelligent modules to promote more intelligent connection