The application of LVS cluster technology in the platform of Teaching resource library _lvs

Source: Internet
Author: User

Absrtact: Introduces the principle and frame of LVS cluster technology. Based on the CentOS operating system, the configuration and implementation of LVS cluster are described, and the configuration, function and performance of the cluster system are tested. The test results show that the cluster system is stable and reliable, and has the characteristics of high availability, scalability and load balancing.
Keywords: LVS; cluster; teaching resource base; load balancing; high availability

With the rapid expansion of the Internet, the traffic of people accessing the Internet is exploding, and the concurrent response ability of the network server is facing severe test. At the same time, more and more complex web transaction processing also put forward higher requirements for server performance. The service provided by a single computer is not capable of such a difficult task, and the emergence of cluster technology effectively solves the problem.
According to the different function, structure and technology of cluster, it can be divided into high-performance cluster, high availability cluster and load Balancing cluster, in which load balancing is the core of cluster technology and the important factor of determining cluster performance [1]. In the development of cluster technology, there are many different kinds of cluster technology implementation, Linux as an open source operating system and based on LVS implementation of Linux cluster technology, it has been more attention.
1 LVS Cluster Technology
Introduction to 1.1 LVs
LVS[2] (Linux virtual Server,linux) is a load-balancing software on the Linux operating system, a Open-source cluster project developed on the Linux operating system in 1998 by Dr. Zhangwensong of the National Defense Technology University [3]. The current technology development is more mature, has become a part of the Linux kernel.
1.2 LVs Model
The framework for the scalable network services provided by LVS is shown in Figure 1. Ipvs software provides three kinds of IP load balancing technology, Ktcpvs implements the application layer Exchange based on content request distribution. You can use the LVS framework to achieve highly scalable, highly available web, FTP, mail, and other network services to develop highly available e-business applications.

LVS implemented load balancing on two levels, based on network layer Ipvs and Ktcpvs content request distribution technology of application layer, three kinds of load balancing technologies were network address translation mode Vs/nat, IP tunneling mode vs/tun and Direct routing mode vs/dr.
General architecture of 1.3 LVS [4]
As shown in Figure 2, the load scheduler is the core of the cluster scheduling, and the client accesses the cluster system through the virtual IP portal. Multiple real servers make up a server pool of real services, and the number of real servers can be dynamically added as needed to share a single storage area. The entire system renders a virtual server externally, with virtual IP, the user through the virtual IP Access load Scheduler, according to the use of load balancing algorithm to dispatch the user's request to a real internal server for processing, multiple servers can execute the user's request in parallel, increase the overall throughput rate of the cluster system [5].

CentOS5 default installation LVs, with Piranha graphical interface for configuration management, beating process pulse is piranha main process, which is responsible for sending and detecting the heartbeat between nodes (Heartbeat) [6-7], Two nodes periodically send heartbeat information to the network, indicating whether the current node is active (active) or inactive (inactive). When LVs begins to work, the LVS process initiates a nanny process for each real server by invoking the IPVSADM program to configure and maintain the Ipvs routing table in the kernel. The nanny process can view the status of configured services on the server, notify the LVS process when a service fails, and the LVS process can invoke ipvsadm to delete the corresponding routing table entries in Ipvs.
When backup router does not receive a response from the active router through the Heartbeat Channel (Heartbeat Channel), the Send_arp function is invoked to re-establish the mapping of the virtual IP to the backup node Mac. The LVS process in the active router is then closed by sending a command to start the LVS process in the backup node to restore and configure the connection between the servers.
2 based on LVS clustering technology on Linux kernel 2.6 [7-8]
2.1 Platform application background
The construction of the shared professional teaching resource database platform in our college is based on the results of the digital campus construction in recent years, which relies on the campus network to construct a function complete, various forms, Content-rich, web-based shared professional teaching resource database software platform, to build an open teaching resources environment, to maximize the need to meet the needs of students ' independent learning. In order to provide the system users (teachers and students) with fluent, uninterrupted, real-time and high-speed access services, the use of open source Linux operating system CentOS5.4, based on the LVS cluster technology, build system platform server. The
2.2 system topology
Platform system provides services out of virtual IP, in Figure 3 ①, ② for load Balancing master, from scheduler, through switched network and real server ③, ④, ⑤, ⑥ connection, platform system sharing internal storage ⑦ and ⑧. Node ① and ② are responsible for forwarding customer requests to real server, when node ① load balancer (load balance) is not working properly, node ① resources and VIP (virtual IP) automatically switch to node ②, the entire system scheduling strategy to use LVS/DR. The shared-Professional teaching resource library platform topology is shown in Figure 3.

The

2.4 Cluster system configuration process
has been integrated with LVS in the CentOS5.4, just select the appropriate suite when installing the system, eliminating the tedious process of kernel compilation.
(1) Configure the network parameters of the appropriate server and install the required Piranha package, as required by topology.
#rpm-IVH piranha-0.8.4-7.el5.i386.rpm
#/etc/init.d/piranha-gui restart
(2) to access http://125.219.112.X:3636, The Web interface configuration for the cluster. The
configuration includes global SETTINGS, redundancy, and virtual SERVERS, the configuration document can refer to [7], and when the configuration is complete, the information is saved to the/etc/sysconfig/ha/lvs.cf file. The
(3) Saves the configuration file on the main scheduler to the backup scheduler. The
(4) starts the Piranha master process separately on the main, from the scheduler.
#service Pulse Restart
3 performance test
After the cluster functional configuration of the platform server is complete, to verify the correctness of the cluster configuration and to meet the requirements of load balancing and high availability, At the same time for the Web site's server response time and throughput performance, do the following tests:
3.1 cluster scheduling test

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.