Linux cluster load balancing introduction

  
 

When learning Linux, you may encounter problems with Linux clusters. Here we will introduce the method of load balancing of Linux clusters. After careful sorting, let's share them here and hope that this article can teach you more things.

Cluster Principle The Linux cluster system consists of two parts: the cluster node and the cluster manager. A cluster node, sometimes referred to as a node, server, or server node, is a system that provides processing resources, and it performs the actual work of the cluster. In general, it must be configured to be part of a cluster and must run clustered applications. Application software can be software dedicated to clustering or standard software designed for distributed systems. The Linux Cluster Manager is a logical structure that bundles nodes together to form a single system look and feel, which is used to decompose tasks into all nodes.

Clusters have different types for different reasons. The most direct reason for setting up a Linux cluster is to share CPU resources, balance the load among multiple machines, gain more system reliability, or A backup system (handover) is provided when the host fails.

The analysis of related software realizes the function of cluster load through traffic management. There are several implementation methods: Direct Forwarding, Network Address Translation (NAT) and tunneling technology ( Tunneling).

Direct Forwarding is a method that can be used when the computers participating in the cluster are on the same network segment as the computers under control management. When the control management computer receives the request packet, it directly sends it to the nodes participating in the cluster. Its advantage is that the traffic returned to the customer does not pass through the control host, and the speed is fast and the overhead is small.

Maybe everyone is familiar with Network Address Translation (NAT). The address translator has a legal IP address that can be accessed by the outside world. It modifies the address of the outgoing packet from the private network. The external packet appears to be from the address translator itself. When the outer packet is sent to the converter, it can determine which node of the intranet should be sent to the packet. Its advantage is that it saves IP addresses and can masquerade internally; the disadvantage is that it is inefficient because the traffic returned to the requester goes through the converter.

Tunneling is a forwarding mechanism used when a node of a Linux cluster is not on the same network segment. It encapsulates IP packets in other network traffic. From a security perspective, you should use a VPN in the tunneling technology or use a leased line.

The services provided by Linux clusters are based on TCP/IP Web services, Mail services, News services, DNS services and Proxy servers. Below I will implement a load balancing Linux cluster system with a specific product TurboLinux Cluster Server to provide Web and FTP services.

Planning 1. Services provided: Web, FTP. 2. Do a more complete load balancing system so that you can use more of them. 3. Use 4 servers, 3 of which install TurboLinux Cluster Server, and 1 install Windows
2000 Sever.

Installation 1. Install Turbo Linux on 3 servers, you also need to install Apache and wu-ftpd, because Linux clusters need to provide this service. After the installation is complete, restart the machine, mount the CD-ROM drive in the directory /mnt/cdrom, execute ./TLCS-install, and then follow the prompts to install it completely. 2. Install Windows 2000 Server on one server and install Internet Information Server 5.0.

Configure Linux Cluster Manager 1. Set the IP address, subnet mask, routing, etc. of each server, adjust the network, and set a TurboLinux server as a DNS server to enable forward resolution. And reverse parsing. The server name is pc1 and the domain is test.com. 2. Configure the Cluster Server. Run Turbolinuxclusteradmin, the settings are as follows (the hyphen is connected to the menu option or its subordinate menu, after the colon is set): (1) ClusterServer Configuration-Cluster Services-Application Stability Agents: ◆ http is the default service, no need to set. ◆ ftp: /usr/lib/ftpAgent. (2) ClusterServer Configuration--Cluster Services--Service Settings: ◆ http,80: TCP, sticky. ◆ ftp, 21: TCP, ftp. (3) ClusterServer Configuration--Servers Configuration: ◆ pc1 (pc1.test.com), direct, ping. ◆ pc2 (pc2.test.com), direct, ping. ◆ pc3 (pc3.test.com), direct, ping. ◆ pc4 (pc4.test.com), direct, ping. (4) ClusterServer Configuration--Advance Traffic Managers: ◆ Advance Traffic Manager System: pc1.test.com. ◆ Advance Traffic Manager Setting: The default value. (5) ClusterServer Configurationà Virtual Severs: ◆ The host is: pc1.test.com. ◆ sendmail: master@pc1 .test.com. ◆ Server pool name: Server Group1. (6) ClusterServer ConfigurationàGloble Settings: Network settings: netmask 255.255.255.0.

Configure Cluster Nodes 1. Configure Windows 2000 Server Nodes Because TurboLinux Cluster Server itself can be automatically synchronized by tools, you only need to configure Windows 2000 Server. (1) Start → Settings & Rarr; Control Panel & Rarr; Add New Hardware & Rarr; Next & Rarr; Add/Exclude Device Faults & Rarr; Add New Device & Rarr; No, Select Hardware & Rarr from List; Other Devices & Rarr; Microsoft: Microsoft Loopback Adapter & rarr; completed. (2) Right click on the desktop and select Network Neighborhood → Attribute → TCP/IP, set IP address, default gateway, subnet mask (set to 255.255.255.0). (3) Start → Run → regedit & rarr; find the registry related to the Microsoft Loopback Adapter, change the subnet mask to 255.255.255.255. (4) Configure the system to run the appropriate services and configure the configuration suitable for cluster manager management so that it can be used in the Control Manager.

2. Configure the TurboLinux Cluster Server node (1) Select tlcs_content _sync in the management menu to perform content synchronization, enter the node machine password to be configured, and copy the service contents in the cluster manager to the node. (2) Select tlcs_ config _sync in the management menu to perform setting synchronization, enter the node machine password to be configured, and copy the settings in the cluster manager to the node. At this point, we can already see the running status on the cluster manager PC1, the client can be connected to the switch of the server, and the client can request the Web and FTP services. If you want to see the operation, you can also use https://pc1.test.com:910 to manage from the cluster manager console.

In computer technology, cluster load balancing is currently a hot technology and a high-end application. The cluster load balancing scheme used in Internet/Intranet is very extensive, especially for large and medium-sized websites. Direct routing, network address translation, and tunneling technology are adopted according to application needs.

Copyright © Windows knowledge All Rights Reserved