1. What is distributed?
A distributed system must be a system composed of multiple nodes.
Among them, the node refers to the computer server, and these nodes are generally not isolated, but interconnected.
Our nodes are deployed on these connected nodes, and the mutual operations will be coordinated.
For users of distributed systems, what they are facing is a server that provides the services that users need.
In fact, these services are a distributed system composed of many servers behind them, so the distributed system looks like a supercomputer.
2. What is the difference between distributed and clustered?
Clustering refers to deploying the same application on several servers to share requests from clients.
It is that the same system is deployed on different servers, for example, a login system is deployed on different servers.
It’s like having multiple people doing the same thing together.
The main usage scenario of the cluster is to share the pressure of requests.
However, when the pressure increases further, the parts that need to be stored, such as mysql, cannot face a lot of “write pressure”.
Because after MySQL is formed into a cluster, the main writing pressure is still on the master machine, and other slave machines cannot share the writing pressure. At this time, the “distributed” _Beijing java training。
Distributed refers to a system in which multiple systems work together to accomplish a specific task.
It is that different systems are deployed on different servers, and the servers call each other.
It’s like having multiple people doing different things together.
Distributed is to solve the problem of centralized management. It is too slow to superimpose all tasks on one node for processing.
So split a big problem into multiple small problems, solve them separately, and finally work together.
The main work of distributed is to decompose tasks and disassemble functions.
The main application scenario of distributed is that a single machine can no longer meet the performance requirements, and multiple nodes must be integrated, and the related parts between the nodes are interactive.
It is equivalent to when writing mysql, each node stores part of the data (sub-database and sub-table), which is the origin of distributed storage.
Store some unstructured data: static files, pictures, pdfs, small videos… These are also the origins of distributed file systems.
Use real-life examples to illustrate clustering and distribution and their differences:
The small restaurant used to have only one chef, who cut and washed vegetables, prepared and cooked all the vegetables.
Later, there were too many guests, and a chef in the kitchen was too busy, so he invited another chef, and the two chefs cooked the same dishes. The relationship between the two chefs was a cluster.
In order to let the chef concentrate on cooking and make the dishes to the extreme, a side chef was invited to be responsible for cutting, preparing and preparing the vegetables. The relationship between the chef and the side chef is distributed.
A side chef was too busy, so he hired another side chef. The relationship between the two side chefs is a cluster.
Finally, a deeper understanding of clustering and distributed and their differences:
Distributed: Divide a large business into multiple sub-businesses, each sub-business is a set of independent systems, and the sub-businesses cooperate with each other to finally complete the overall large business.
Cluster: Deploy multiple nodes for a system that processes the same business.
Splitting a system into different subsystems and deploying them on different servers is called distributed.
Deploying multiple identical systems on different servers is called a cluster. The same system deployed on different servers must be “load balanced”.
The cluster is mainly to simply add machines to solve the problem, without any decomposition of the problem itself.
Distributed processing must involve task decomposition and answer merging. A subtask node in the distribution can be a cluster, and any node in the cluster appears as a complete task.
Both cluster and distributed are composed of multiple nodes, but communication coordination is basically not required between nodes in the cluster, and communication coordination of each node in distributed is essential.
The article is reproduced from Java bosom friend