当前位置:网站首页>What are clustering, distribution, and microservices?
What are clustering, distribution, and microservices?
2022-06-24 05:06:00 【User 7426861】
How to choose an application architecture ?
Microservice architecture is very popular recently ,10 Personal small company to do a project also requires micro service architecture as a hard condition , The daily visits to the website are less than 1000 Of web Applications also require microservice Architecture , So, is it good to use microservice architecture , Let me talk about it in a popular way . To find out the problem , You need to understand the following buzzwords .
colony
Let's talk about clusters : To build a house , Brickwork is needed , One man builds bricks too slowly , need 10 Individual bricklayer, worker, colleague to build , This greatly improves efficiency , We say this 10 Individuals form a cluster . Clustering is that everyone does the same thing , Let's do it together , Everyone doesn't depend on each other . Put it in our software production environment , Clustering is to improve efficiency by stacking up server hardware to do the same job .
Distributed
Distributed , seeing the name of a thing one thinks of its function , There is a concept of division of labor . Let's take the example of bricklaying , We build bricks , You need to move the bricks first , Put it by the wall , Need cement mortar , Then you can start bricklaying . If with cement mortar , To move the brick , Building walls is for the same person , Even if it's 10 personal , Maybe it's not efficient , At this point, distributed is on the stage . We can arrange for 2 Personal specialty and cement mortar ,2 Individuals carry bricks to the wall ,6 The individual is only responsible for bricklaying . In this case , Although the number of people has not increased , But efficiency is bound to improve . That's understandable , Clusters don't have to be distributed , But distributed is definitely a cluster , It requires multiple servers to work together . So at this point , There's another problem , If there is no cement mortar , The bricklayer needs notice and cement mortar suspension , Quickly transport the cement mortar to the wall . In reality, you can shout with your mouth , You can make a phone call , How to inform the server at this time , This involves rpc(remote process communication), Let's briefly mention this , Next time, we can discuss it in depth separately .
Microservices
Microservices are an architecture , The principle is very similar to distributed , Its resolution granularity is very fine , It's so detailed that everyone only does one thing that can't be decomposed , And these little things don't have to be on different servers , Many microservices, such as A service ,B service ,C service , The other server has B service ,C service ,D service . It is worth noting that , All services need to be notified of a place called a registry , It can be understood that this is the project manager , He came to coordinate management .
summary
If your business is simple , There are also very few visits , That all applications put a server can also run smoothly , At this time, even the cluster does not need to use . If your visits are small , But the business is complex , For example , Take e-commerce as an example , The process of placing an order , Orders need to be submitted , payment , Colleagues need to check whether the warehouse has inventory , Then send the address to the third party logistics to place an order , If these things are done together , need 30 second . Users need to wait 30 Seconds to see whether you have successfully purchased , This experience is very bad , Even if your platform only deals one day 100 single , The number of visits is very small , The user experience is still not good . At this time, you can use distributed to solve this problem , Pay , Check inventory , Inform the third party logistics to split into 5 One or more jobs . such , The user experience has greatly improved , You can do a shopping in seconds . If you have a lot of traffic , Each process step is complex , So at this point , You can distribute the steps , Allocate more server clusters , At this time, it is more appropriate to use microservice architecture . Based on previous operations app Experience , Millions of visits a day , Every interaction is 2 Applications in seconds , As long as the bandwidth is enough , take web Separate from the database and add a redis cache ,2 One mainstream server is enough .
边栏推荐
- Qiming cloud sharing: tips on esp32c3 simple IO and serial port
- How to file ECS? What should be paid attention to when selecting ECS
- Zhang Xiaodan, chief architect of Alibaba cloud hybrid cloud: evolution and development of government enterprise hybrid cloud technology architecture
- Pgbouncer lightweight PG connection pool management tool
- Shopify background XSS storage vulnerability
- The easyplayer player displays compileerror:webassembly Reason for instance() and its solution
- Bi-sql distinct
- Detailed explanation of the process after the browser enters the domain name and web address
- Hard core observation 553 AI needs to identify almost everyone in the world with hundreds of billions of photos
- Critical service failed
猜你喜欢

解析后人类时代类人机器人的优越性
![[leetcode daily question] push domino](/img/81/1c31e97d9a245816514bcf47c92107.jpg)
[leetcode daily question] push domino

Training methods after the reform of children's programming course

What is the new generation cloud computing architecture cipu of Alibaba cloud?

Introduction to the "penetration foundation" cobalt strike Foundation_ Cobalt strike linkage msfconsole

Zhang Xiaodan, chief architect of Alibaba cloud hybrid cloud: evolution and development of government enterprise hybrid cloud technology architecture

Recognize workplus again, not only im but also enterprise mobile application management expert

让孩子们学习Steam 教育的应用精髓

Let children learn the application essence of steam Education

少儿编程教育在特定场景中的普及作用
随机推荐
What server does domain name and IP address convert through? How does the server convert?
LeetCode 1662. Check whether two string arrays are equal
RedHat 8 time synchronization and time zone modification
011_ Cascader cascade selector
How does ECS publish websites? What software tools are needed?
Is it useful to build an industrial knowledge map platform?
阿里云新一代云计算体系架构 CIPU 到底是啥?
Use of go testing framework gomock
CTF learning notes 18:iwesec file upload vulnerability-03-content-type filtering bypass
让孩子们学习Steam 教育的应用精髓
How to operate ECs and what types of system configuration schemes can be supported
Replication of variables in golang concurrency
Introduction to ebpf
Leetcode question brushing (question 3) - the longest substring without repeated characters
Digital transformation practice of Zheshang Bank
CTF learning notes 17:iwesec file upload vulnerability-02 file name filtering bypass
What is the domain name of the website? How much is a domain name
MySQL cases MySQL find out who holds the row lock (RC)
How novices choose ECs and how to judge the quality of ECS
Bi-sql insert into