Last updated on

General Architecture of LVS Clusters


General Architecture of LVS Clusters

For transparency, scalability, availability and manageability of the whole system, we usually adopt three-tie architecture in LVS clusters illustrated in the following figure.
为了整个系统的透明性,可扩展性,可用性和可管理性,我们通常在下图所示的LVS集群中采用三tie架构。

image

The three-tie architecture consists of
三系体系结构包括

  • Load Balancer, which is the front-end machine of the whole cluster systems, and balances requests from clients among a set of servers, so that the clients consider that all the services is from a single IP address. 负载平衡器是整个集群系统的前端机器,它在一组服务器之间平衡来自客户端的请求,以便客户端认为所有服务都来自一个ip地址。

  • Server Cluster, which is a set of servers running actual network services, such as Web, Mail, FTP, DNS and Media service. 服务器集群,是一组运行实际网络服务的服务器,如Web、邮件、FTP、DNS和媒体服务。

  • Shared Storage, which provides a shared storage space for the servers, so that it is easy for the servers to have the same contents and provide the same services. 共享存储,它为服务器提供了共享的存储空间,因此服务器很容易具有相同的内容并提供相同的服务。

Load balancer is the single entry-point of server cluster systems, it can run IPVS that implements IP load balancing techniques inside the Linux kernel, or KTCPVS that implements application-level load balancing inside the Linux kernel. When IPVS is used, all the servers are required to provide the same services and contents, the load balancer forward a new client request to a server according to the specified scheduling algorithms and the load of each server. No matter which server is selected, the client should get the same result. When KTCPVS is used, servers can have different contents, the load balancer can forward a request to a different server according to the content of request. Since KTCPVS is implemented inside the Linux kernel, the overhead of relaying data is minimal, so that it can still have high throughput.
负载平衡器是服务器集群系统的单一入口点,它可以运行在linux内核中实现IP负载平衡技术的ipvs,也可以运行在linux内核中实现应用程序级负载平衡的ktcpv。使用ipvs时,要求所有服务器提供相同的服务和内容,负载平衡器根据指定的调度算法和每个服务器的负载将新的客户端请求转发给服务器。无论选择哪个服务器,客户端都应获得相同的结果。当使用KTCPVS时,服务器可以具有不同的内容,负载平衡器可以根据请求的内容将请求转发到不同的服务器。由于KTCPVS是在linux内核内部实现的,因此中继数据的开销很小,因此它仍然可以具有高吞吐量。

The node number of server cluster can be changed according to the load that system receives. When all the servers are overloaded, more new servers can be added to handle increasing workload. For most Internet services such as web, the requests are usually not highly related, and can be run parallely on different servers. Therefore, as the node number of server cluster increases, the performance of the whole can almost be scaled up linearly.
服务器集群的节点号可以根据系统接收的负载进行更改。当所有服务器过载时,可以添加更多新服务器来处理不断增加的工作负载。对于大多数Internet服务 (例如web),请求通常不是高度相关的,并且可以在不同的服务器上并行运行。因此,随着服务器集群节点数的增加,整个性能几乎可以线性扩展。

Shared storage can be database systems, network file systems, or distributed file systems. The data that server nodes need to update dynamically should be stored in data based systems, when server nodes read or write data in database systems parallely, database systems can guarantee the consistency of concurrent data access. The static data is usually kept in network file systems such as NFS and CIFS, so that data can be shared by all the server nodes. However, the scalability of single network file system is limited, for example, a single NFS/CIFS can only support data access from 4 to 8 servers. For large-scale cluster systems, distributed/cluster file systems can be used for shared storage, such as GPFS, Coda and GFS, then shared storage can be scaled up according to system requirement too.
共享存储可以是数据库系统、网络文件系统或分布式文件系统。服务器节点需要动态更新的数据应该存储在基于数据的系统中,当服务器节点并行地在数据库系统中读取或写入数据时,数据库系统可以保证并发数据访问的一致性。静态数据通常保存在NFS和CIFS等网络文件系统中,以便所有服务器节点都可以共享数据。但是,单个网络文件系统的可扩展性有限,例如,单个NFS/CIFS只能支持4到8个服务器的数据访问。对于大型集群系统,可以使用分布式/集群文件系统进行共享存储,例如GPFS,Coda和GFS,然后也可以根据系统需求扩展共享存储。

Load balancer, server cluster and shared storage are usually connected by high-speed networks, such as 100Mbps Ethernet network and Gigabit Ethernet network, so that the network will not become the bottleneck of system when the system grows up.
负载均衡器、服务器集群和共享存储通常通过高速网络连接,如100Mbps以太网和千兆以太网,这样在系统成长的过程中网络就不会成为系统的瓶颈。