Load Balancing of four servers

Source: Internet
Author: User


When talking about Server Load balancer, you must first start with the cluster. A cluster is a group of computers connected together. From the outside, it is a system, each node can be a computer composed of different operating systems or different hardware. For example, a cluster that provides Web Services is a large Web server. However, cluster nodes can also provide services separately.

The concept of a cluster is easy to confuse with some concepts (SMP, NUMA, MPP, and distributed processing). The main difference is that resources are shared and replicated at different levels. They are arranged in the most tight to loose manner by SMP, NUMA, MPP, cluster, and distribution processing.

SMP (Multi-processing system): This type of system has multiple CPUs in a computer, and the status between CPUs is equal. They share memory space and I/O devices. The operating system is responsible for dividing tasks into multiple concurrent processes and running them on different CPUs.

NUMA (non-uniform memory access): This system allows the CPU of multiple processing computers to share local memory more efficiently than SMP, And the CPU can access a single memory area more quickly, however, you can also indirectly access the memory of other regions if needed. This method gives some CPUs a higher priority to use physical memory within a given range.

MPP (massively parallel processing): All nodes in this system have their own CPUs and their own proprietary resources. This structure is relatively independent, but each node generally does not have full access to I/O.

Cluster: the cluster system is composed of independent computers, but managed in a unified manner using control management tools.

Distribution processing: it is more loosely connected than the cluster system we want to build. Generally, tasks are completed in different places and cannot be used as a single entity for overall management.

The above aggregation methods are tight and sparse, and they all have their own applicability. I will not talk about them here. If you are interested, please find some information for reference, this is just to let everyone know where it is.

How to achieve Load Balancing
The purpose of a cluster is to share and efficiently use resources, provide large-scale operations, provide Server Load balancer to distribute request pressure, and switch between clusters in case of a fault to achieve high availability.

This article only introduces the implementation of Server Load balancer (for turbolinux cluster ).
Server ). By analyzing the relevant software, the Cluster load function is implemented through traffic management. There are several implementation methods: direct
Forwarding, Nat, and tunneling ).

· Direct routing)

This method can be used when the computer participating in the cluster and the computer acting as the control and management computer are in the same network segment. When the control and management computer receives the request packet, it is directly sent to the node participating in the cluster. The advantage is that the traffic returned to the customer is not controlled by the host, and the speed is fast and low.

· Network Address Translation (NAT)

This method may be familiar to everyone. The address converter can have a legitimate IP address that can be accessed by the outside world. It modifies the address of the outbound package from the VPC. The outside world looks like the package is from the address converter itself, when an external package is sent
To the converter, it can determine which node should be sent to the Intranet. The advantage is that it saves IP addresses and can disguise the interior. The disadvantage is that the efficiency is low because the traffic returned to the requester goes through the converter.

· Tunneling)

This method is available when the cluster node is not in the same network segment. It is a method of encapsulating IP packets in other network traffic. To ensure security, VPN in tunneling technology should be used, you can also use a leased line.

The cluster can provide services such as TCP/IP-based Web services, mail services, news services, DNS services, and proxy servers, the following describes the specific turbolinux cluster server product to implement a load balancing cluster system for providing web and FTP services.

Server Load balancer instances of four servers
Provided services: Web and FTP.

System implementation objective: to build a better load balancing system so that more functions can be used.

Device status: four servers are used, three of which are turbolinux Cluster Server and one is Windows 2000 Sever.

· System installation

1. install turbolinux on the two servers. Apache and wu-ftpd must also be installed because the cluster must provide such services. After installation, restart and mount the optical drive to the/mnt/CDROM directory, execute. /TLCS-install, and then complete the installation as prompted.

2. to install Windows 2000 server on a server, you must install Internet Information Server 5.0.

· System Configuration

1. Set the IP address, subnet mask, and route of each server to enable the network and set a turbolinux server as a DNS server so that it can forward and reverse resolution. The server name is pC1 and the domain is test.com.

2. Configure cluster server. Run turbolinux clusteradmin. The settings are as follows (Note: The Arrow connects to the menu options, the arrow refers to the lower menu, and the setting is followed by the colon ).

Clusterserver configuration → cluster Services → application stability agents:

(1) HTTP is the default service and does not need to be set

(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 Value

Clusterserver configuration → virtual severs:

(1) Host: pc1.test.com

(2) Sendmail: master@pc1.test.com.

(3) server pool name: servergroup1

Clusterserver configuration → globle settings:

Network Settings: Netmask

· Configure various cluster contacts

Because turbolinux cluster server itself can be automatically synchronized by tools, you only need to configure Windows 2000 Server:

Start → set → Control Panel → add new hardware → next → Add/Remove device fault → add new device → No, I want to select hardware from the list → other devices → Microsoft: microsoft loopback adapter → complete.

Right-click "Network Neighbor" on the desktop → properties → TCP/IP → set IP address, default gateway, and subnet mask (Note: Set to first ).

Start → run → Regedit → locate the Microsoft loopback adapter-related item in the Registry and change the subnet mask to

Configure the system to run the appropriate services and configure the configurations suitable for Control Manager management, so that they can be used in control manager.

· Execute content synchronization in the management menu

Select tlcs_content_sync and enter the password to copy and control the service content on the management computer.

· Execute settings synchronization in the management menu

Select tlcs_config_sync, enter the password, and set it on the copy control management computer.

Now you can enter the running status to connect the client to a switch on the server, the client can request web and FTP services, and you need to view the running status can be managed from the https://pc1.test.com: 910 on the console.

In computer technology, Cluster load balancing is a self-built system. Currently, it is a popular technology and a high-end application. The cluster Load Balancing solution is widely used in the Internet/Intranet.
This technology is widely used, especially for large and medium-sized websites.
Forwarding, Nat, and tunneling are all used as needed. It plays a very high role in the network and has been paid attention to by people, such
If you are interested, try again.

(Responsible editor yubei lvye@staff.ccidnet.com)

This site article only represents the author's point of view, this site only transmits information, does not express approval or opposition. When reprinting the site content, please indicate from www.linuxeden.com-Linux Eden. If not specified, www.linuxeden.com will be held legally responsible in accordance with the internet copyright administrative protection measures.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.