Server Load balancer Based on layer-4 Switching Technology

Source: Internet
Author: User
Tags domain name server

1 Introduction

The world has entered the information age. With the rapid development of society and the increasing demand for network applications, the demand for network speed and bandwidth is constantly increasing. Under such circumstances, many new technologies of High-speed exchange are emerging. Layer-2 exchange enables fast information exchange between hosts in the LAN. layer-3 Exchange is a perfect combination of exchange technology and routing technology, the layer-4 switching technology described below provides optimal allocation of network application resources to achieve load balancing of application services.
  
2 layer-4 Exchange Technology
2.1 Brief Introduction
  
A simple definition of layer-4 switching is that it is a function that determines that transmission is not only based on the MAC address (layer-2 Bridge) or the source/Target IP address (layer-3 route ), based on the TCP/UDP (Layer 4) application port number. The layer-4 switching function is like a virtual IP address pointing to a physical server. Its transmission services are subject to a variety of protocols, including HTTP, FTP, NFS, telnet, or other protocols. These services require complex load balancing algorithms based on physical servers. In the IP address world, the service type is determined by the TCP or UDP port address of the terminal. The application interval in the layer-4 switch is jointly determined by the source and terminal IP addresses, TCP and UDP ports.
  
In the layer-4 switch, a virtual IP address (VIP) is set up for each server group for search. Each group of servers supports an application. Each application server address stored in the Domain Name Server (DNS) is a VIP address, rather than a real server address.
  
When a user applies
A vip connection request with the target server group (for example, a TCP
SYN Packet) sent to the server switch. The server switch selects the best server in the group, replaces the VIP in the terminal address with the actual Server IP address, and sends the connection request to the server. In this way, the same zone
All packets are mapped by the server switch and transmitted between the user and the same server.
  
2.2 Technical Principles
  
The fourth layer of the OSI model is the transport layer. The transport layer is responsible for peer communication, that is, coordinated communication between the network source and the target system. In the IP protocol stack, This is the protocol layer of TCP (Transmission Control Protocol) and UDP (User Datagram Protocol.
  
In layer-4, the TCP and UDP headers contain port numbers, which uniquely differentiate which application protocols (such as HTTP and FTP) are contained in each packet ). The endpoint system uses this information to distinguish packet data, especially the port number, so that a computer system at the receiving end can determine the type of the IP packet it receives and hand it over to appropriate high-level software. A combination of port numbers and device IP addresses is usually called socket )". The latest list of allocated port numbers can be found in RFC 1700 "assigned numbers.
  
The additional information provided by the TCP/UDP port number can be used by the network switch, which is the basis for layer-4 switching. Vswitches with layer-4 functions can act as "Virtual Switches" connected to the server
The role of the IP address (VIP) Front-end. Each server and server group supporting a single or common application is configured with a VIP address. This vip address is sent and registered on the domain name system.
  
When a service request is sent, the layer-4 switch identifies the start of a session by determining the start of TCP. Then it uses complex algorithms to determine the best server for processing this request. Once this decision is made, the switch associates the session with a specific IP address and replaces the VIP address on the server with the real IP address of the server.
  
Each layer-4 switch stores a source IP address that matches the selected server and a connection table associated with the source TCP port. The layer-4 switch then forwards the connection request to the server. All subsequent packets are reinjected and forwarded between the client and the server until the switch discovers a session.
  
When layer-4 switching is used, the access can be connected to a real server to meet user-defined rules, for example, the number of connections on each server is equal or the transmission stream is allocated based on the capacity of different servers.
  
2.3 products with layer-4 exchange capability
  
Currently, Berkeley networks, Alteon
Networks and other companies have mature layer-4 exchange products and modules. Berkeley networks exponent E4 and Alteon
Networks's aceswith
180 the two layer-4 switches have outstanding performance and flexibility, and can make intelligent forwarding decisions than the layer-2 and layer-3 switches. The header query code is embedded into the dedicated IC of the switch.
(ASIC) to implement the above functions, almost no delay. The vswitches of both vendors can implement the 10 m, M, and gibit Ethernet functions, but the Berkeley switch is
It is designed for enterprise applications, while Alteon switches are used for institutions with a large number of web or FTP servers. The layer-4 Switching Technology of Alteon enables the performance and running status of servers.
Based on the health status of different servers, the incoming data traffic is allocated to the appropriate server in a cost-effective and efficient manner. At the same time, the layer-4 Switching Technology of Alteon has the Web high-speed cache
The redirection function can intercept the HTTP Communication destined for a remote Internet host and redirect the communication to a local high-speed cache server, thus greatly accelerating access
The speed of the internet, and saves a lot of valuable Wan bandwidth. In addition, this is completely transparent to users and information providers and does not need to be set by users and information providers.
  
Smartswitch router and torrent networking of Cabletron
The ip9000 gibit router launched by technologies is also a product with layer-4 switching features. Here, smartswitch
The router can upgrade the backbone network from the conventional Layer-3 switching to the comprehensive layer-3 and layer-4 switching functions. Its unique WAN integration capability and access control capability based on layer-4 switching for the Network
Data transmission plays a key role in a secure and orderly manner. In addition, Cabletron smartswitch
Based on the layer-4 Switching QoS function, the router provides different levels of priority processing capabilities for data exchange for specific business applications.
  
3. Use layer-4 switching technology to achieve server load balancing
The following design comes from the practical application of the network center of a Network Education College in a university. The layer-4 switch of Alteon provides Server Load balancer for various application services for remote instruction, improving the overall network performance.
  
Students perform remote interactive learning over the Internet. The Network Center of the network school has three groups of servers, each of which includes several servers with the same content. There are Web Server groups, teaching server groups, and data (database) server groups. Each group of servers has a virtual IP address. Students access these application servers over the Internet. Each group of servers is connected to the layer-4 switch of Alteon to achieve load balancing of application services.
  
The layer-4 switch of Alteon monitors the server availability, including the health status of physical connections, server hosts, and service applications. When a server cannot provide the corresponding services, the switch automatically
The application requests are allocated to other servers. Alteon layer-4 switches can be further guaranteed by setting the maximum number of sessions per server, overflow servers, backup servers, and other methods.
The reliability of the server system. Multiple Load Balancing algorithms are used for Server Load balancer in the same LAN, including least connection and round.
Round Robin, minmiss, and hash algorithms, and weighting algorithms. When the server is not in the same LAN, use the globalload of the Alteon Switch
Balance Technology to achieve the rationality of load balancing.
  
Assume that the Web server group has three identical Web servers S1, S2, and S3. The actual IP address of S1 is 10.1.1.1, the actual IP address of S2 is 10.1.1.2, and the actual IP address of S3 is 10.1.1.3. The virtual IP address of this web server group is 61.134.38.5.
  
When multiple students access our web services at the same time, the Alteon layer-4 switch receives multiple concurrent requests to access the Web Services on 61.134.38.5. At this time, the layer-4 switch of Alteon will reasonably allocate these requests to S1, S2, and S3 based on certain algorithms to achieve dynamic load balancing.
  
The above section briefly introduces the application of layer-4 Switching Technology in Server Load balancer. However, layer-4 switching not only supports Server Load balancer, but also supports other functions, such as application type and user ID-based transmission flow control.
Function. Using Multi-Level queuing technology, the layer-4 switch can mark the transmission stream and assign priority to the transmission stream based on the application. In addition, the layer-4 switch is directly placed on the front end of the server. It understands the application session content and
User Permissions make it an ideal platform to prevent unauthorized access to the server.
  
4. Summary
With the development of network information systems from small to medium-sized to large, the exchange technology also evolved from the original MAC address-based exchange to IP address-based exchange, further developed to IP + end-based
Currently, layer-7 (Content-Based Switching) is also proposed ). This article gives a comprehensive introduction to the layer-4 exchange technology, and applies this technology to the education system to achieve load balancing of servers.
Balance. It can be seen that the continuous development of network exchange technology has changed from data-based exchange to application-based exchange, which not only improves the network access speed, but also constantly optimizes the overall network performance.
  

Source: China Data Communication

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.