当前位置:网站首页>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 .
边栏推荐
- How novices choose ECs and how to judge the quality of ECS
- Fluent version control FVM
- Mini web framework: adding routes in decorator mode | dark horse programmer
- What is the use of domain name cloud resolution? What are the factors for domain name errors
- Precautions for online education and training industry filing
- Spirit breath development log (16)
- What is cloud server? How to access the ECS Homepage
- Tencent conference rest API x-tc-registered parameter policy update notification
- [leetcode daily question] push domino
- SAP mts/ato/mto/eto topic 10: ETO mode q+ empty mode unvalued inventory policy customization
猜你喜欢

解析后人类时代类人机器人的优越性

What are the disadvantages of the free IP address replacement tool?

Are you ready for the exam preparation strategy of level II cost engineer in 2022?

Detailed explanation of tcpip protocol

解析90后创客教育的主观积极性

Popularization of children's programming education in specific scenarios

梯度下降法介紹-黑馬程序員機器學習講義

Facebook internal announcement: instant messaging will be re integrated

Leetcode question brushing (question 3) - the longest substring without repeated characters

CTF learning notes 17:iwesec file upload vulnerability-02 file name filtering bypass
随机推荐
Troubleshooting for the error message "[err] mod\u local\u stream.c:880 unknown source default" in easyrtc
Bi-sql basic cognition
What server does domain name and IP address convert through? How does the server convert?
问题:sql创建存储过程
Getattribute return value is null
"Emergency response practice" logparser log analysis practice
LeetCode 1791. Find the central node of the star chart
Develop a customized music player from scratch, and your girlfriend will have it?
What are the functions and advantages of the Internet of things cloud platform?
Bi-sql where
解析90后创客教育的主观积极性
Blackmail virus prevention guide
Customer disaster recovery case - a MySQL database migration scheme
NAT
What is the use of domain name cloud resolution? What are the factors for domain name errors
What is the secondary domain name of the website? What is the relationship between the secondary domain name and the primary domain name?
There are many ways to confirm and modify the remote port number
When remote, your resolution is lower than a × B. Some items may not be displayed on the screen
梯度下降法介紹-黑馬程序員機器學習講義
How RedHat 8 checks whether the port is connected