Interview Questions: Differences and connections between distributed and cluster, Interview Questions Cluster

Source: Internet
Author: User

Interview Questions: Differences and connections between distributed and cluster, Interview Questions Cluster

I. Differences:
In a word, distributed systems work in parallel, and clusters work in tandem.
1. Distributed refers to the distribution of different services in different places. A cluster refers to the combination of several servers to implement the same service.
Every node in the distributed architecture can be used as a cluster. Clusters are not necessarily distributed.
For example, if there are too many people accessing xinlang, he can build a cluster with a response server in front of it, and the following servers can complete the same business. If there is a business access, the response server determines which server will be completed if the load is not heavy.
In a narrow sense, the distributed architecture is similar to a cluster, but its organization is loose. Unlike a cluster, it has an organizational structure. If one server crashes, other servers can be topped up.
Each distributed node completes different services. If a node crashes, this service is inaccessible.
2. In short, the distributed architecture improves the efficiency by shortening the execution time of a single task, while the cluster improves the efficiency by increasing the number of tasks executed per unit time.
The following is a simple example:
If a task is composed of 10 subtasks, it takes one hour for each subtask to be executed separately, it takes 10 hours to execute the task on a server.
The Distributed Solution Provides 10 servers. Each server is only responsible for processing one subtask, regardless of the dependency between subtasks. It takes only one hour to complete this task. (A typical example of this working mode is Hadoop's Map/Reduce distributed computing model)
The cluster solution also provides 10 servers, each of which can handle this task independently. Assume that 10 tasks arrive at the same time, and 10 servers will work at the same time. After one hour, 10 tasks will be completed at the same time. In this way, you can complete a task within one hour!
Ii. cluster concept
1. Two key features
A cluster is a group of service entities that work collaboratively to provide a service platform that is more scalable and available than a single service entity. In the client's view, a cluster is like a service entity, but in fact the cluster is composed of a group of service entities. Compared with a single service entity, a cluster provides the following two key features:
A. Scalability:The cluster performance is not limited to a single service entity. New service entities can be dynamically added to the cluster to enhance the cluster performance.
B. High Availability:The cluster uses service entity redundancy to free the client from warnings of out of service. In a cluster, the same service can be provided by multiple service entities. If a service entity fails, the other service entity takes over the failed service entity. The function provided by the cluster to restore an error service entity to another service entity enhances the availability of the application.
2. Two capabilities
To ensure scalability and high availability, clusters must have the following two capabilities:
A. Load Balancing:Server Load balancer distributes tasks evenly to computing and network resources in the cluster environment.
B. error recovery:For some reason, the resource for executing a task fails, and the resource for executing the same task in another service entity completes the task. This is because resources in one entity cannot work, and the process of transparently continuing to complete tasks in other entities is called error recovery.
Both Server Load balancer and error recovery require that each service entity has resources for executing the same task. For each resource of the same task, the Information view (information context) required for executing the task is required) must be the same.
3. Two major technologies
To implement a cluster, you must have the following two technologies:
A. Cluster address:A cluster consists of multiple service entities. The cluster client obtains the functions of each service entity in the cluster by accessing the cluster address of the cluster. A single cluster address (also called a single image) is a basic feature of a cluster. The setting of maintaining the cluster address is called the Server Load balancer. The server Load balancer manages the addition and exit of various service entities, while the external server is responsible for switching the cluster address to the internal service entity address. Some Load Balancing machines implement real load balancing algorithms, and some support task conversion only. Server Load balancer that only implements task conversion is applicable to cluster environments that support ACTIVE-STANDBY. There, only one service entity in the cluster works. When a working service entity fails, the server Load balancer redirects subsequent tasks to another service entity.
B. Internal Communication:In order to work collaboratively, achieve load balancing and error recovery, each entity in the cluster must communicate frequently. For example, the Server Load balancer communicates the heartbeat test information of the service entity and the execution context information of tasks between service entities.
With the same cluster address, the client can access the computing services provided by the cluster. The internal addresses of various service entities are hidden under one cluster address, this allows the customer to request a computing service to be distributed among various service entities. Internal communication is the basis for the normal operation of the cluster, which enables the cluster to have load balancing and error recovery capabilities.
Iii. Cluster Classification
Linux clusters are mainly divided into three categories: high-availability clusters, Server Load balancer clusters, and scientific computing clusters)
1. High Availability Cluster)
Generally, HA clusters made up of two nodes have many unscientific names, such as "dual-machine hot backup", "dual-machine mutual backup", and "dual-machine ".
The high-availability cluster ensures that your applications continuously provide external services. (Note that a high-availability cluster is not used to protect business data, but to protect your business programs from providing external services without interruption, minimize the impact of software/hardware/human faults on the business ).
2. Load Balance Cluster)
Server Load balancer system: All nodes in the cluster are active and share the workload of the system. Generally, Web Server Clusters, database clusters, and Application Server Clusters belong to this type.
A server Load balancer cluster is generally used as a web server or database server for network requests. When receiving requests, the cluster can check and accept servers with fewer and less busy requests and send requests to these servers. From the perspective of checking the status of other servers, Server Load balancer is very similar to the fault-tolerant cluster. The difference is that the number is more.
3. High Performance Computing Cluster)
High-performance Computing (HPC) clusters. These clusters are designed to provide powerful computing capabilities that a single computer cannot provide.
Iv. Connection and difference between distributed (cluster) and Cluster
Distributed refers to the distribution of different services in different places.
A cluster refers to the combination of several servers to implement the same service.
Every node in the distributed architecture can be used as a cluster.
Clusters are not necessarily distributed.
For example, if there are too many people accessing xinlang, he can build a cluster with a response server in front of it, and the following servers can complete the same business. If there is a business access, the response server determines which server will be completed if the load is not heavy.
In a narrow sense, the distributed architecture is similar to a cluster, but its organization is loose. Unlike a cluster, it has an organizational structure. If one server crashes, other servers can be topped up.
Each distributed node completes different services. If a node crashes, this service is inaccessible.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.