The difference between a distributed and a cluster

Source: Internet
Author: User

To put it simply, distributed is to improve efficiency by shortening the execution time of a single task, while clustering increases efficiency by increasing the number of tasks executed per unit of time.

For example:

If a task consists of 10 subtasks, each of which takes 1 hours to execute separately, it takes 10 hours to perform the change on a single server.

The distributed scheme provides 10 servers, each server is responsible for only one sub-task, regardless of the dependencies between subtasks, it takes one hours to complete this task. (A typical representation of this mode of operation is the Map/reduce distributed computing model of Hadoop)

The use of cluster scheme, also provides 10 servers, each server can handle this task independently. Assuming there are 10 tasks to arrive at the same time, 10 servers will work at the same time, 10 small, 10 tasks at the same time, so that the whole view, or 1 hours to complete a task!

The following is a excerpt from a Web article:

First, the concept of clustering

1. Two key Features

A cluster is a group of service entities that work together to provide a more scalable and usable service platform than a single service entity. In the client's view, a cluster is like a service entity, but in fact the cluster consists of a set of service entities. Compared to a single service entity, the cluster provides the following two key features:

· Scalability--The performance of a cluster is not limited to a single service entity, and new service entities can be dynamically added to the cluster, thereby enhancing the performance of the cluster.

· High Availability--clustering through service entity redundancy allows the client to avoid the warning of out of service easily. In a cluster, the same service can be provided by multiple service entities. If one service entity fails, another service entity takes over the failed service entity. The ability of the cluster to recover from one faulty service entity to another enhances the usability of the application.

2. Two major competencies

For scalability and high availability, the cluster must have the following two capabilities:

· Load balancing-load balancing distributes the tasks to compute and network resources in a cluster environment in a more balanced manner.

· Error recovery-For some reason, the resource that performs one task fails, and the resource in another service entity performs the same task. This process of continuing to complete a task is called error recovery because resources in one entity are not working, and resources in another entity are transparent.

Load balancing and error recovery require that resources exist in each service entity to perform the same task, and that the information view (information context) required to perform the task must be the same for each resource in the same task.

3. Two major technologies

There are two major technologies that must be implemented to implement the cluster:

· Cluster address--the cluster consists of multiple service entities, and the cluster client obtains the functions of each service entity within the cluster by accessing the cluster's address. Having a single cluster address (also known as a single image) is a fundamental feature of a cluster. The setting to maintain the cluster address is called a load balancer. The internal responsibility of the load balancer is to manage the join and exit of each service entity, and the external is responsible for the conversion of the cluster address to the internal service entity address. Some load balancers implement a true load balancing algorithm, and some only support task conversions. A load balancer that only implements task conversions applies to a clustered environment that supports Active-standby, where only one service entity is working, and when a working service entity fails, the load balancer shifts subsequent tasks to another service entity.

· Internal communication-in order to work together, load balancing and error recovery, the cluster entities must communicate with each other frequently, such as the load Balancer's heartbeat test information for the service entity and the communication between the Service entity's task execution context information.

Having the same cluster address allows the client to access the compute services provided by the cluster, hiding the internal addresses of each service entity under a cluster address, so that the client's required computing services can be distributed across service entities. Internal communication is the basis for the cluster to function properly, which makes the cluster capable of balancing load and error recovery.

Second, cluster classification

Linux clusters are divided into three main categories (high-availability clusters, load-balanced clusters, scientific computing clusters)

    • Highly available clusters (high availability Cluster)
    • Load Balancer cluster (load Balance Cluster)
    • Scientific computing Clusters (high performance Computing Cluster)

Details include:

Linux high availability highly available cluster
(Common two-node dual-machine hot standby, multi-node ha cluster, RAC, GKFX, share-nothing cluster, etc.)

Load Balancer cluster for Linux load Balance
(LVs etc...)

Linux High Performance Computing performance Scientific Computing cluster
(Beowulf class cluster ....)

Three, Detailed introduction

1. Highly available cluster (high availability Cluster)

Common is 2 nodes made of HA cluster, there are many popular unscientific names, such as "dual-machine hot standby", "dual-machine mutual preparation", "dual-machine".

A highly available cluster solves the ability of a user's application to continuously deliver services externally. (Note that high-availability clusters are neither used to protect business data, but that the user's business processes are continuously serviced, minimizing the impact of software/hardware/human-caused failures on the business).

2. Load Balancer cluster (load Balance Cluster)

Load balancing system: All nodes in the cluster are active and they share the workload of the system. Generic Web server clusters, DB clusters, and application server clusters are of this type.

A load Balancer cluster is typically used for Web servers, database servers, for corresponding network requests. This cluster can, upon request, check for servers that accept fewer requests, are not busy, and transfer requests to those servers. From the point of checking other server states, load balancing and fault tolerant clusters are very close, and the difference is more in number.

3. Scientific computing Cluster (high performance Computing Cluster)

High Performance Computing (perfermance Computing) clusters, referred to as HPC clusters. Such clusters are dedicated to providing powerful computing power that a single computer cannot provide.

3.1 High Performance Computing classification

3.1.1 High throughput calculation (High-throughput Computing)

There is a class of high-performance computing, which can be divided into several sub-tasks that can be parallelized, and the subtasks are not related to each other. Like searching for aliens at home ( [email protected] – Search for extraterrestrial Intelligence at home) is this type of application. This project uses idle computing resources on the Internet to search for aliens. The SETI server sends a set of data and data patterns to a compute node on the Internet that participates in SETI, and the compute node searches for a given pattern on the given data and then sends the results of the search to the server. The server is responsible for pooling the data returned from each compute node into complete data. Because a common feature of this type of application is to search for certain patterns on massive amounts of data, this kind of calculation is called high-throughput computing. So-called Internet computing belongs to this category. According to the classification of Flynn, high throughput calculation belongs to the scope of SIMD (single instruction/multiple Data).

3.1.2 Distribution calculation (distributed Computing)

The other kind of calculation is just the opposite of high throughput computation, although they can be divided into several parallel subtasks, but the sub-tasks are closely related and require a lot of data exchange. According to the classification of Flynn, distributed high-performance computing belongs to the MIMD (multiple instruction/multiple Data) category.

Iv. the relationship and difference between distributed (cluster) and cluster

Distributed refers to the distribution of different services in different places, and the cluster refers to a few servers together to achieve the same business.

Each node in the distribution can be a cluster. Clusters are not necessarily distributed.

Example: For example, Sina, the number of people who visit, he can do a cluster, the front of a response server, the next few servers to complete the same business, if there is business access, the response server to see which server load is not very heavy, will be to which to complete.

and distributed, from the narrow meaning of understanding, but also similar to the cluster, but its organization is relatively loose, unlike clustering, there is an organizational, a server collapsed, the other servers can be top up.

distributed to each node, all of the different business, a node collapsed, then the business is inaccessible.

The difference between a distributed and a cluster

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.