Implement the load balancing of four web servers
The concept of clusters is easier to confuse some concepts (SMP, NUMA, MPP, distribution processing), which mainly distinguishes between resources to be shared and replicated. They are in SMP, NUMA, MPP, clusters, and distributed processing from the most close to the most loose arrangement.
SMP (multi-processing system): This system has multiple CPUs in a computer, and the status between the CPU is equal, they share memory space and I / O devices. Its working method is to break down the task into multiple concurrent processes, which will then run on different CPUs.
NUMA (non-uniform memory access): This system allows multiple processing computers to share local memory more efficiently than SMP, CPU can access a single memory area more quickly, but if needed, you can access indirectly. The memory of other regions, this method is to make some CPUs have more prioritized priority use rights in a given range of physical memory.
MPP (giant parallel processing): This system has its own CPU and has its own proprietary resources. This structure is relatively independent, but each node generally does not completely access I / O ability.
Cluster: The cluster system is composed of separate computers, but there is a control management tool unified management.
Distribution Process: It is a loose connection than the cluster system we have to build, usually the task is done in different places, and can not be used as a single entity for overall management.
The above aggregation methods have a sharp way, they have their own scope of application, here don't say more, interested, you can find some information, here just want everyone to understand the location of it.
Method for realizing load balancing
The purpose of the cluster is to share and efficiently utilize resources, providing large operations, providing load balancing request pressure, and can perform high availability when there is a fault.
Limited to the space, this article only provides some introductions to the load balancing (for TurboLinux Cluster Server). Through the analysis of related software, the function of the cluster load is implemented through traffic management, and there are several implementation methods: direct forwarding, network address translation (NAT), tunnel technology (tunneling).
Direct Forwarding
When participating in the cluster, the computer is used as a computer to use this method when the control management is in the same network segment, the control management computer receives the request packet to participate directly to the node participating in the cluster. The advantage is that the traffic returns to the customer does not control the host, and the speed is overhead.
Network address conversion (NAT)
This method may be more familiar, the address converter can be accessed by the external access to the legitimate IP address, which modifies the address of the outflow package from the proprietary network, and the outside world looks from the address converter itself, when the outside package is sent to When converters, it can determine which node should be delivered to the internal network. The advantage is to save IP addresses to camouflage internal; the disadvantage is low efficiency because the traffic returns to the requester passes through the converter.
Tunneling
This approach is a process of forwarding a re-delivery mechanism that is not available when the node of the cluster is not in the same network segment. It is a method of encapsulating IP packets in other network traffic. For security considerations, VPNs in tunnel technology should also be used. .
The services that the cluster can provide is based on TCP / IP web services, Mail services, News services, DNS services, Proxy servers, etc. We will implement a specific product Turboux Cluster Server to implement a load balancing cluster system for use in Provide Web and FTP services.
Load balancing examples of four servers
The services provided: Web, FTP.
The implementation of the system: Do a system that is better than the load balancing so that more functions can be used.
Using equipment status: use four servers, 3 of which installed Windows 2000 Sever, and 1 installed Windows 2000 Sever installed in 3 sets of TurboLinux Cluster Server.
System installation
1. Install Turbolinux on both servers, Apache and WU-FTPD are also installed, because the cluster is to provide this service, restart after installation, the mount optical drive under the directory / mnt / cdrom, execute ./tlcs-install, Then press the prompt. 2. Install Windows 2000 Server on a server to install Internet Information Server 5.0.
System Configuration
1. Set the IP address, subnet mask, route, etc. of each server, the network, set a Turbolinux server as a DNS server, enabling it to parse and reverse parsing. Server Name This example is PC1, and the domain is Test.com.
2. Configure Cluster Server. Perform turbolinux clusterAdmin, set the situation as follows (Note: The arrow is connected to the menu option, the arrow is refer to the next order, and finally the first colon is set).
ClusterServer Configuration → Cluster Services → Application Stability Agents: (1) HTTP is the default service, no setup
(2) FTP ---- / usr / lib / ftpagent
ClusterServer Configuration → Cluster Services → Service Settings:
(1) HTTP, 80: TCP, Sticky
(2) FTP, 21: TCP, FTP
ClusterServer Configuration → Servers Configuration:
(1) PC1 (pc1.test.com), Direct, Ping
(2) PC2 (pc2.test.com), Direct, Ping
(3) PC3 (pc3.test.com), Direct, Ping
(4) PC4 (PC4.Test.com), Direct, Ping
ClusterServer Configuration → Advance Traffic Managers:
(1) Advance Traffic Manager System: pc1.test.com
(2) Advance Traffic Manager Setting: Default
ClusterServer Configuration → Virtual Severs:
(1) The host is: pc1.test.com
(2) Sendmail: master@pc1.test.com
(3) Server pool name: ServerGroup1
ClusterServer Configuration → Global Settings:
Network settings: Netmask 255.255.255.0
Configure each joints of the cluster
Because TurboLinux Cluster Server itself can be automatically synchronized by the tool, just configure Windows 2000 Server:
Start → Settings → Control Panel → Add New Hardware → Next → Add / Exclude Equipment → Add New Device → No, I want to select Hardware from the list → Other devices → Microsoft: Microsoft Loopback Adapter → Complete.
On the desktop, right-click "Online Neighbors" → Properties → TCP / IP → Set IP Address, Default Gateway, Subnet Mask (Note: First Credited: 255.255.255.0).
Start → Run → regedit → Find the entry related to Microsoft Loopback Adapter in the registry to change the subnet mask to: 255.255.255.255.
Configure the system to run the appropriate service and configure the configuration of the appropriate control manager management so that you can use in the control manager.
Perform content synchronization in the management menu
Select TLCS_CONTENT_SYNC, enter your password, copy the service content in the control management computer.
Perform settings in the management menu Synchronize TLCS_CONFIG_SYNC, enter your password, copy the settings in the control computer.
It is already possible to enter the running state, and the client can be connected to the server's switch. The client can request the Web and FTP services, and you need to view the run. You can use the console from https://pc1.test.com:910 management.
In computer technology, the cluster load balancing is a self-contained system. It is now a hot technology. It is also a high-end application. It is very extensive in the Internet / Intranet, especially large and medium-sized websites. Direct Forwarding, Network Address Translation (NAT), Tunneling will be used due to need. It is also very high in the network and is emphasized, if you are interested, you can try it too.