Cluster and distributed
From: http://blog.csdn.net/tanghongru1983/archive/2009/04/27/4130356.aspx
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:
· 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.
· 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:
· Server Load balancer-Server Load balancer distributes tasks evenly to computing and network resources in the cluster environment.
· Error recovery-for some reason, the resource for executing a task fails, and the resource for executing the same task in another service entity is then completed. 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:
· Cluster address-a cluster consists of multiple service entities. The cluster client can access the cluster address to obtain the functions of various service entities in 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 balancers implement real load balancing algorithms, and some only support task conversion. 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.
· Internal Communication-in order to work collaboratively and achieve load balancing and error recovery, all entities in the cluster must communicate frequently, for example, the Server Load balancer communicates the heartbeat test information of the service entity and the context information of tasks between the 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.
Cluster category
Linux clusters are mainly divided into three categories: high-availability clusters, Server Load balancer clusters, and scientific computing clusters)
High Availability Cluster)
Load Balance Cluster)
High Performance Computing Cluster)
========================================================== ==========
Including:
High Availability cluster in Linux
(Common dual-node Hot Standby, multi-node HA cluster, RAC, shared, share-nothing cluster, etc)
Linux load balance load balancing Cluster
(LVS and so on ....)
Linux high performance computing high-performance scientific computing cluster
(Beowulf class cluster ....)
Distributed Storage
Other types of Linux Clusters
(Such as openmosix and rendering farm ..)
Details
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.
High-performance computing Classification
High-throughput computing (high-throughput computing)
There is a type of high-performance computing, which can be divided into several parallel subtasks, and each subtask has no association with each other. This type of application is used to search for aliens at home (SETI @ Home -- Search for Extraterrestrial Intelligence at home. This project uses idle computing resources on the Internet to search for aliens. The server of the SETI project sends a set of data and data modes to the computing nodes that participate in the SETI on the Internet. The computing nodes search for the given data in the given mode, then, send the search result to the server. The server is responsible for integrating the complete data returned from each computing node. Because a common feature of this type of application is to search for certain modes of massive data, this type of computing is called high-throughput computing. Internet computing belongs to this category. Based on Flynn classification, high-throughput computing falls into the SIMD (Single Instruction/multiple data) category.
Distributed Computing)
Another type of computing is opposite to high-throughput computing. Although they can be divided into several parallel subtasks, the subtasks are closely related and require a large amount of data exchange. According to Flynn classification, distributed high-performance computing belongs to the scope of MIMD (Multiple Instruction/multiple data.
4. Relationship 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.