[Daily Know] What is cluster/distributed? (2021.02.09)

[Daily Know] What is cluster/distributed? (2021.02.09)

1. What is a cluster

 
Computer cluster

  • It is a computer system , which computer is connected hardware and software together highly closely together to complete the calculations. In a sense, it can be seen as a computer.
  • Commonly used to improve single computer computational speed and reliability , generally more than a single computer, such as a super computer or a workstation cost performance higher

Cluster technical characteristics

  • Through multiple complete computers in the same business, to achieve greater efficiency .
  • The content and working process of two or more machines are exactly the same . If one machine crashes, the other one can work.

Give a chestnut

Xiao Zhou writes Java programs in the company, but the company's business is developing. A Java developer may not be too busy . Sometimes Xiao Zhou has to ask for a leave. So I asked 3y to do Java development together. Xiao Zhou and 3y usually write Java programs, but 3y may have to go back to school for something. It's okay, the company still has a small week to do Java development, and the company's development can continue to operate.

  • Both 3y and Xiao Zhou are doing Java development.
  • 3y is here, Xiao Zhou can share some of his work.
  • 3y asked for leave, there is still Xiao Zhou.

Give another chestnut

I wrote a 910 convenience website and published it to the server. Now more and more people are accessing it. The access is a bit slow . What should I do? ? ? It's very simple, (only by charging money to become stronger), add configuration (add cpu, add memory) . After upgrading the configuration, the number of visitors increased , so I found that it was not disabled anymore. Adding configuration on this machine can no longer solve it. What should I do? ? ? It's very simple. (Only by charging money to become stronger), I buy another server and publish 910.com to the newly purchased server.

  • Both servers are running the same system—>910.com
  • Originally there was only one machine handling the visit, but now two machines are handling the visit, sharing the pressure.
  • If one of them forgets to pay, it won’t be used temporarily. It doesn't matter, there is another one available.

to sum up
Cluster : the same business, deployed on multiple servers ( different servers run the same code and do the same thing)

 
 

Second, what is distributed

 
Distributed Systems

  • It is a system formed by a group of computers that are connected to each other through a network to deliver messages and communications and coordinate their behavior . The components interact with each other to achieve a common goal .

Give a chestnut

Now the company has Xiao Zhou and 3y doing Java development together. For Java development, generally jQuery and AJAX can write a little bit, so we do all these tasks. However, 3y is not very familiar with the front-end , sometimes it can't be adjusted for a long time after debugging. The boss thinks 3y is a real dish! So let Xiao Zhou specialize in front-end matters. In this way, 3y is happy and can concentrate on writing his own Java, and the front-end will be specifically handed over to Xiao Zhou. As a result, Xiao Zhou and 3y became collaborative development .

  • 3y is not familiar with the front end (can write it out), but it may take a lot of time to debug
  • Xiao Zhou has devoted himself to front-end things, and 3y can concentrate on writing his own Java programs.
  • All for the normal operation and iteration of the project.

Give another chestnut

My 910 convenience network has been deployed to two servers , but more and more people visit it. Now I can't bear it gradually . What should I do now? ? Then continue to recharge to become stronger? ? As a sane me, I must think about what is wrong. Now there are several modules of 910.com , all of which are lost in the same Tomcat .

Actually , access to some modules is very low (such as background management), then can I do this: extract each module independently, install the modules with a large amount of visits on a good server , and there is no bad use of the modules accessed by people The server is installed .

The advantages of this are:
1. Reasonable use of resources . Modules that no one visits use poorly-performing servers, and modules that have a large amount of visits alone can improve performance.
Second, the coupling degree is reduced. Each module is independent, and each does its own thing (professional people do professional things), which is convenient for expansion.

  • Split the function of 910 convenience network , the modules are independent, and then combine these independent modules to form a system when in use .
  • Modules are independent , each does its own thing, easy to expand, high reusability
  • High throughput . A certain task requires a machine to run for 10 hours , and the task is run in a distributed manner with 10 machines (the task is divided into 10 small tasks), and it may be run in 2 hours .

to sum up
Distributed : A business splits multiple sub-businesses and deploys them on different servers (different servers run different codes for the same purpose )

 
 

Three, cluster/distributed

Cluster and distributed do not conflict , there can be distributed clusters .

chestnut

Now the scale of 3y's company has grown . There are 5 lads writing Java, 4 lads writing front-end, 2 lads doing testing, and 1 lad doing DBA.

  • 5 Java is seen as a cluster of
  • Relations Java, front-end, testing, DBA is seen as a distributed a

 
 

Turn almost knew: https: //zhuanlan.zhihu.com/p/43023436
Author: Java3y

The content has been processed and reorganized √

====================================================================
Daily update
If you like this kind of form, remember to leave a message thumbs attention , your support is the driving force of my work, I also share with you while learning √ together
Suggestions, corrections, and criticisms are welcome.

Guess you like

Origin blog.csdn.net/qq_51366188/article/details/113769852