发表于: 2008.06.02 13:55
分类: 工作流
出处: http://tbase.itpub.net/post/4931/463415
---------------------------------------------------------------
1.集群的历史
集群,英文叫cluster,是一个老话题了,使用yahoo.cn, baidu.com和g.cn都没有搜索到究竟集群这个概念是从什么开始提出的,后来发现了一篇英文文章http: //www.domaingurus.com/faqs/what-is-a-server-cluster.html,想详细了解的话可以看看。
2.为什么要做服务器做集群?
通常情况下,我们的应用都不需要做集群,但随着访问量的加大,一台服务器无法支撑,无法做出快速的响应,而且在这种访问压力下,有可能会压垮服务器。这种 情况下,我们需要增加服务器、分发请求给各个服务器,但必须保证在客户看来是在访问一个服务器而不是多个。下面引用了袁红岗的一段采访记录,应该说比较有 说服力:
“在以下两种情况下集群是有用的:1. 高并发超负荷运行的主机,例如google这样的网站,它的访问量是相当大的,因此google会采取集群策略来分散客户的请求,以提高整体响应能力。我 们接触的很多J2EE应用负荷量都不大,其实每秒访问量在500以下的应用都没有必要采取集群策略。2. 失效转移,其实我认为这才是集群真正有用的地方,使用一台低成本计算设备作为主设备的备份,在主设备发生故障时及时接替,以保证7x24小时不间断服务。 综上所述,在准备采用集群之前,一定要仔细分析具体的应用环境,以避免不必要的浪费。”....
1.集群的历史
集群,英文叫cluster,是一个老话题了,使用yahoo.cn, baidu.com和g.cn都没有搜索到究竟集群这个概念是从什么开始提出的,后来发现了一篇英文文章http: //www.domaingurus.com/faqs/what-is-a-server-cluster.html,想详细了解的话可以看看。
2.为什么要做服务器做集群?
通常情况下,我们的应用都不需要做集群,但随着访问量的加大,一台服务器无法支撑,无法做出快速的响应,而且在这种访问压力下,有可能会压垮服务器。这种 情况下,我们需要增加服务器、分发请求给各个服务器,但必须保证在客户看来是在访问一个服务器而不是多个。下面引用了袁红岗的一段采访记录,应该说比较有 说服力:
“在以下两种情况下集群是有用的:1. 高并发超负荷运行的主机,例如google这样的网站,它的访问量是相当大的,因此google会采取集群策略来分散客户的请求,以提高整体响应能力。我 们接触的很多J2EE应用负荷量都不大,其实每秒访问量在500以下的应用都没有必要采取集群策略。2. 失效转移,其实我认为这才是集群真正有用的地方,使用一台低成本计算设备作为主设备的备份,在主设备发生故障时及时接替,以保证7x24小时不间断服务。 综上所述,在准备采用集群之前,一定要仔细分析具体的应用环境,以避免不必要的浪费。”
3.服务器集群的难点
作为每个web应用,实现会话是最基本的要求。我们都知道用户在访问服务器的时候,服务器会为每个用户生成一个唯一的session,当如果下次这个用户 的请求被分发到集群中的另一台的时候,那台服务器也必须要重新创建一个新的session,导致用户前面的session信息丢失。因此,集群的一个重要 难点在于如何保证这些集群服务器使用的session都是该用户的同一个session。
- 多台集群服务器之间互相复制session信息
- 一台服务器存放session信息,由集群服务器读取
- 将session信息保存于客服端cookie,节省session复制的开销
可以想到,1和2其实都有很大的开销,而3则是一个不错的选择,当然有一个极大的缺陷:无法保持多个请求之间的状态信息,而只能保存一些最基本的、经常使用的信息。
Server Cluster Definition
原文URL: http://www.domaingurus.com/faqs/what-is-a-server-cluster.html
What is a Cluster?
A cluster is the aggregation of multiple stand-alone computers linked together by software and networking technologies to create a unified system.
Clusters are typically categorized into 2 general types:
- High Performance Computing (HPC), made up of markets traditionally serviced by supercomputers for applications requiring greater computational power than a single computer can provide; or
- Enterprise or High Availability (HA) with automatic failover, load balancing, redundancy, and other features that provide high reliability for the data center. Many HPC clusters also incorporate some of the features of HA clusters.
Application requirements vary between and within each of these system types. For this reason it’s imperative that you choose a cluster partner that understands the intricacies of cluster design and can help you avoid the pitfalls of cluster deployment.
High-availability (HA) clusters
High-availability clusters are implemented primarily for the purpose of improving the availability of services which the cluster provides. They operate by having redundant nodes, which are then used to provide service when system components fail. The most common size for an HA cluster is two nodes, which is the minimum requirement to provide redundancy. HA cluster implementations attempt to manage the redundancy inherent in a cluster to eliminate single points of failure. There are many commercial implementations of High-Availability clusters for many operating systems. The Linux-HA project is one commonly used free software HA package for the Linux OS
Load-balancing clusters
Load-balancing clusters operate by having all workload come through one or more load-balancing front ends, which then distribute it to a collection of back end servers. Although they are primarily implemented for improved performance, they commonly include high-availability features as well. Such a cluster of computers is sometimes referred to as a server farm. If this packages does not meet your needs, or if you need help determining how best to utilize the power of a dedicated server cluster, complete our advanced sever cluster questionnaire and our sales team will prepare a custom hosting quote just for you.
High Performance Computing (HPC) Clusters
Linux clusters are democratizing supercomputing for engineers, scientists, and researchers whose work demands the highest levels of computational analysis, modeling, and simulations. The Customers section of this site explains how innovative teams in a variety of industries are using HPC clusters to help speed up product development and groundbreaking research.
HPC clusters are optimized for workloads which require jobs or processes happening on the separate cluster computer nodes to communicate actively during the computation. These include computations where intermediate results from one node's calculations will affect future calculations on other nodes.
Cluster history
The history of cluster computing is best captured by a footnote in Greg Pfister's In Search of Clusters: "Virtually every press release from DEC mentioning clusters says 'DEC, who invented clusters...'. IBM didn't invent them either. Customers invented clusters, as soon as they couldn't fit all their work on one computer, or needed a backup. The date of the first is unknown, but I'd be surprised if it wasn't in the 1960's, or even late 1950's."
The formal engineering basis of cluster computing as a means of doing parallel work of any sort was arguably invented by Gene Amdahl of IBM, who in 1967 published what has come to be regarded as the seminal paper on parallel processing: Amdahl's Law. Amdahl's Law describes mathematically the speedup one can expect from parallelizing any given otherwise serially performed task on a parallel architecture. This article defined the engineering basis for both multiprocessor computing and cluster computing, where the primary differentiator is whether or not the interprocessor communications are supported "inside" the computer (on for example a customized internal communications bus or network) or "outside" the computer on a commodity network.
Consequently the history of early computer clusters is more or less directly tied into the history of early networks, as one of the primary motivation for the development of a network was to link computing resources, creating a de facto computer cluster. Packet switching networks were conceptually invented by the RAND corporation in 1962. Using the concept of a packet switched network, the ARPANET project succeeded in creating in 1969 what was arguably the world's first commodity-network based computer cluster by linking four different computer centers (each of which was something of a "cluster" in its own right, but probably not a commodity cluster). The ARPANET project grew into the Internet -- which can be thought of as "the mother of all computer clusters" (as the union of nearly all of the compute resources, including clusters, that happen to be connected). It also established the paradigm in use by all computer clusters in the world today -- the use of packet-switched networks to perform interprocessor communications between processor (sets) located in otherwise disconnected frames.
The development of customer-built and research clusters proceded hand in hand with that of both networks and the Unix operating system from the early 1970s, as both TCP/IP and the Xerox PARC project created and formalized protocols for network-based communications. The Hydra operating system was built for a cluster of DEC PDP-11 minicomputers called C.mmp at C-MU in 1971. However, it wasn't until circa 1983 that the protocols and tools for easily doing remote job distribution and file sharing were defined (largely within the context of BSD Unix, as implemented by Sun Microsystems) and hence became generally available commercially, along with a shared filesystem.
The first commercial clustering product was ARCnet, developed by Datapoint in 1977. ARCnet wasn't a commercial success and clustering per se didn't really take off until DEC released their VAXcluster product in the 1984 for the VAX/VMS operating system. The ARCnet and VAXcluster products not only supported parallel computing, but also shared file systems and peripheral devices. They were supposed to give you the advantage of parallel processing, while maintaining data reliability and uniqueness. VAXcluster, now VMScluster, is still available on OpenVMS systems from HP running on Alpha and Itanium systems.
Two other noteworthy early commercial clusters were the Tandem Himalaya (a circa 1994 high-availability product) and the IBM S/390 Parallel Sysplex (also circa 1994, primarily for business use).
No history of commodity compute clusters would be complete without noting the pivotal role played by the development of Parallel Virtual Machine (PVM) software in 1989. This open source software based on TCP/IP communications enabled the instant creation of a virtual supercomputer -- a high performance compute cluster -- made out of any TCP/IP connected systems. Free form heterogeneous clusters built on top of this model rapidly achieved total throughput in FLOPS that greatly exceeded that available even with the most expensive "big iron" supercomputers. PVM and the advent of inexpensive networked PC's led, in1993, to a NASA project to build supercomputers out of commodity clusters. In 1995 the invention of the "beowulf"-style cluster -- a compute cluster built on top of a commodity network for the specific purpose of "being a supercomputer" capable of performing tightly coupled parallel HPC computations. This in turn spurred the independent development of Grid computing as a named entity, although Grid-style clustering had been around at least as long as the Unix operating system and the Arpanet, whether or not it, or the clusters that used it, were named. reference: wikipedia