附录 A. 使用带 Red Hat 的 LVS 群集
您可以使用带 Red Hat LVS 路由器的群集来部署高度可用的商业网站,以提供负载平衡、数据完整性和源程序的可用性。
The configuration in 图 A.1 “LVS with a Red Hat Cluster” represents an e-commerce site used for online merchandise ordering through a URL. Client requests to the URL pass through the firewall to the active LVS load-balancing router, which then forwards the requests to one of the Web servers. The Red Hat Cluster nodes serve dynamic data to the Web servers, which forward the data to the requesting client.
图 A.1. LVS with a Red Hat Cluster
Serving dynamic Web content with LVS requires a three-tier configuration (as shown in 图 A.1 “LVS with a Red Hat Cluster”). This combination of LVS and Red Hat Cluster allows for the configuration of a high-integrity, no-single-point-of-failure e-commerce site. The Red Hat Cluster can run a high-availability instance of a database or a set of databases that are network-accessible to the Web servers.
进行三层配置可提供动态内容。如果网页服务器只提供静态网页内容(包括少数不经常修改的数据),那么两层 LVS 配置就可以了,但如果需要提供动态网页内容,两层配置就不行了。动态内容可包括产品目录、购买订单或者客户数据库,这些内容必须在所有网页服务器中都是一致的,以确保客户可以访问最新的准确信息。
每层可提供以下功能:
- 第一层 — LVS 路由器执行负载平衡来分配网页请求。
- 第二层 — 为请求提供服务的一组网页服务器。
- 第三层 — 为网页服务器提供数据的 Red Hat 群集。
In an LVS configuration like the one in 图 A.1 “LVS with a Red Hat Cluster”, client systems issue requests on the World Wide Web. For security reasons, these requests enter a Web site through a firewall, which can be a Linux system serving in that capacity or a dedicated firewall device. For redundancy, you can configure firewall devices in a failover configuration. Behind the firewall are LVS load-balancing routers, which can be configured in an active-standby mode. The active load-balancing router forwards the requests to the set of Web servers.
Each Web server can independently process an HTTP request from a client and send the response back to the client. LVS enables you to expand a Web site's capacity by adding Web servers behind the LVS routers; the LVS routers perform load balancing across a wider set of Web servers. In addition, if a Web server fails, it can be removed; LVS continues to perform load balancing across a smaller set of Web servers.