You are on page 1of 8

Applying Linux High-Availability and Load Balancing Servers for Video-on-Demand (VOD) Systems

Chao-Tung Yang1 , Ko-Tzu Wang1 , Kuan-Ching Li2 , and Liang-Teh Lee3


High Performance Computing Laboratory, Dept. of Computer Science and Information Engineering, Tunghai University, Taichung 407, Taiwan ROC ctyang@mail.thu.edu.tw 2 Parallel and Distributed Processing Center, Dept. of Computer Science and Information Management, Providence University, Taichung 433, Taiwan ROC kuancli@pu.edu.tw 3 Dept. of Computer Science and Engineering, Tatung University, Taipei 104, Taiwan ROC ltlee@cse.ttu.edu.tw
1

Abstract. In this research paper, we integrate and implement High-Availability (HA) and Load-Balancing technologies to clusters of workstations, increasing both the availability and scalability of services and resources in these systems. The cluster of workstations is commonly built and used as web-based VOD servers. Thus, this paper presents the hardware and software congurations of cluster systems working as VOD servers. Keywords: VOD servers, Cluster Computing Systems, High-Availability, Load Balancing.

1 Introduction
Supercomputers are systems that lead the world in processing capacity and power. Many of design tricks that enabled past supercomputers to outperform all other systems are now incorporated into personal computers, making a single modern desktop PC of today more powerful than a 15-year old supercomputer. Because of problems carried out by supercomputers that can easily be split up into smaller parts to be worked on simultaneously, traditional supercomputers can often be replaced by parallel-processing systems clusters of workstations, several individual personal machines programmed and interconnected among themselves to act as one computer. A PC-based cluster is basically a computer system that interconnects two or more individual computers or systems (often called computing nodes) that cooperate with each other in order to execute applications. Common end-goals for building and running applications on a cluster system includes: an increase in reliability, load distribution and achievement of high-performance. There are two basic types of cluster systems: high-availability cluster systems and load balancing cluster systems. Nowadays, Video-on-Demand (VOD) includes a diverse set of services and opportunities. Todays technology allows telecommunication network operators to offer services
This research was supported in part by National Science Council, Taiwan, under grant no. NSC92-2213-E-126-006.
K. Aizawa, Y. Nakamura, and S. Satoh (Eds.): PCM 2004, LNCS 3332, pp. 455462, 2004. c Springer-Verlag Berlin Heidelberg 2004

456

C.T. Yang et al.

such as home shopping, games, and movies on demand. These services should have a competitive price comparing to the video rental, and customers do not need to travel for these services. These possibilities have been reached with the development of the telecommunication and electronic industry. The capacity of a hard disk has doubled almost every year at a nearly-constant cost. The useful compression ratio for video has been increased considerably. MPEG format video can be transported at few megabits per second rate. Video-on-Demand (VOD) is a subscriber video service where customers can interactively select his/her choice from a collection of alternatives. As the underlying technologies are relatively new, VOD still lacks a universal standardization. Nevertheless, many research institutes and commercial organizations have established de-facto standards and consequently, there are many operational VOD-related services available today. In this paper, the technologies of High-Availability and Load Balancing are combined and implemented into a PC-based cluster system, with the goal of increasing both the availability and scalability of services and resources when using this type of computer systems. By combining high-availability and fail-over clustering solutions, it is provided robust performance and virtually non-existent downtime. Combo clusters are the perfect solution for ISPs and network applications in which continuous uptime is critical. Still in this research paper, we show that the VOD system using cluster of workstations proposed in our research achieves high response time and non-disruption of service.

2 Background
Increasing critical commercial applications are developed over the Internet, providing highly available services that are increasingly important. One of the most important advantages of a clustered system is that its hardware and software are implemented with redundancy. High availability can be provided by detecting computing node or daemon failures and reconguring the system appropriately, so that the workload can be taken over by the remaining computing nodes of the cluster system. In fact, high availability is a quite big eld. An elegant highly available system may have a reliable group communication sub-system, membership management, quorum sub-systems, concurrent control sub-system and other modules. There are several researches to be done. Though, in this meantime, we can use some existing software to construct highly available Linux Virtual Server (LVS) systems. Load balancing clusters integrate multiple systems that share the load of incoming requests in an equitably distributed manner [4,5]. The systems do not work together on a single process, but rather handle incoming requests independent one of another. This type of cluster is especially suited to ISPs and e-commerce applications that require real-time resolution of several simultaneous incoming requests. Additionally, to organize a cluster to be scalable, it must ensure that each server is fully utilized. The standard technique for accomplishing this is Load Balancing. The basic idea behind load balancing is, by distributing the load proportionally among all the servers in the cluster system, the servers can each run at full capacity, while all requests receive the lowest possible response time. This is the type of cluster system that distributes incoming trafc or resource requests among multiple computing nodes running the same programs. Every node in the cluster

Applying Linux High-Availability and Load Balancing Servers

457

is able to handle requests. If a computing node fails, requests are redistributed among remaining available computing nodes. This type of request distribution is very useful in a web hosting environment. The system architecture of load balancing servers is shown in Figure 1-Left.

Fig. 1. Left. System architecture of Load-Balancing servers. Right. System architecture of HighAvailability servers.

Fail-over clustering technique [1,4,5] allows Network Administrators to improve signicantly quality of service levels for practically every TCP/IP based network service, such as WWW, Mail, News, and FTP. Unlike distributed processing clusters, high-availability clusters seamlessly and transparently integrate existing stand-alone, non-cluster aware applications, together into a single virtual network, providing the architectural framework necessary to allow the network to continuously and effortlessly grow, to meet performance and reliability demands. This type of servers is shown in Figure 1-Right. This technology aims at achieving uninterrupted availability of services and resources through the use of redundancy built into the system. The general idea is that, if one computer node in the cluster fails, applications or services that were running on that node, it automatically fail-overs to an available running node. The types of applications that typically use this type of clusters can be listed as mission-critical database, mail, and le and application servers. The le system used in our VOD system is parallel virtual le system (PVFS). The PVFS project has been conducted jointly between The Parallel Architecture Research Laboratory at Clemson University and The Mathematics and Computer Science Division at Argonne National Laboratory [6,7,8,9,10,11]. The PVFS is an effort to provide a parallel le system for PC-based clusters. As a parallel le system, PVFS provides a global name space, striping data across multiple I/O nodes, and multiple user interfaces as shown in Figure 2-Left. The system is implemented at user level, so no kernel modications are necessary to install or run such system. All communications are performed using TCP/IP, so no additional message passing libraries are needed, and support is included for using existing binaries on PVFS les.

458

C.T. Yang et al.

3 The Proposed System


Video-On-Demand (VOD) systems are designed by integrating high-availability and load-balancing servers on PC-based clusters has been discussed in [2,3,12,13,14]. In this section, it is described the design of the proposed system, its implementation, and the rationale behind it. Figures 2-Right, 3-Left and 3-Right show the system architecture and hierarchy of a typical VOD system. The main objective of VOD system is to simplify the storage of thousands of hours of multimedia material, integrating high-capacity, high-latency, tertiary storage systems, called archive servers, with low-capacity, rapid-access, secondary storage systems, called video le servers. We have developed a storage policy (i.e., cache policy) to determine which les need to be migrated to the video le server, in order to reduce the expected access time when a user requests material. VOD system establishes a framework where it is possible to implement different cache policies that permits faster answers to the clients based on the media access patterns.

Fig. 2. Left. PVFS consists of multiple HDs on PCs. Right. System architecture of a typical VOD system.

Fig. 3. Left. Hierarchy of a VOD architecture. Right. VOD system.

Applying Linux High-Availability and Load Balancing Servers

459

Fig. 4. System architecture of VideoLAN.

If we have several clients trying to access stored media, several video le servers that can play media, one or more archive servers that integrate tertiary storage into the architecture by using PVFS and a database that stores meta-data using MySQL needed to identify stored material and locate desired material. See gure 4 for more details. The second goal of VOD system is to support media assets with different video, audio, image, and text formats, and thus, avoiding the user to deal with multiple formats inherent in multimedia material. Users can add new data types and formats by providing directives that describe how to treat new type or format. For example, a user can have different versions of the same video shot (e.g., AVI, MPEG, and RealVideo formats), but he wants to handle these les as only one object. The VideoLAN [12] is selected and used in our VOD system as shown in Figure 4. This VideoLAN solution includes: VLS (VideoLAN Server), which can stream MPEG-1, MPEG-2 and MPEG-4 les, DVDs, digital satellite channels, digital terrestrial television channels and live videos on the network in unicast or multicast, VLC (initialy VideoLAN Client), which can be used as a server to stream MPEG-1, MPEG-2 and MPEG-4 les, DVDs and live videos on the network in unicast or multicast; or used as a client to receive, decode and display MPEG streams under multiple operating systems. The following libraries are installed in each client: Libdvdcss: to be able to read encrypted DVDs, Libdvdplay: to have DVD menu navigation, Libdvbpsi: to be able to read from the network, a52dec: to be able to decode the AC3 (i.e. A52) sound format often used in DVDs, ffmpeg, libmad and faad2: to read MPEG-4 / DivX les, libogg and libvorbis: to read Ogg Vorbis les.

On the client side, the user can input commands to initiate the screen in order to view the video in Linux OS environment. See Figures 5-Left and 5-Right for screen visualization.

460

C.T. Yang et al.

Fig. 5. Left. VLC screen view Right. VOD system portal.

As a VOD server, you need a running Web server. For example, you can use a Linux server running Apache. Make your MPEG-1, MPEG-2 or MPEG-4/DivX les available to the clients on the Web server. For example, we have a Web server that DNS name is local server. In this server, we put an MPEG le video1.xyz that is available to clients at the URL http://localserver/video1.xyz and use the following command [root@fs1/root]# vlc -vvv video1.mpeg --sout udp:Users IP The third objective of the VOD system is to permit easy control (e.g., browsing, addition, modication, and deletion) of material using a well-known desktop interface metaphor as shown in Figures 6-Left and 6-Right. In addition, the system should allow remote users to access the system using the Internet. The goals have been achieved by integrating access to the system into a web-based Graphical User Interface (GUI).

Fig. 6. Left. VOD system register function. Right. VOD system monitor and control.

Finally, the system provides access control through a remote identication and authentication service. It implements a policy to relate ownership and access control and therefore, enforce access restrictions. In this way, it is possible to create management services such as copyright protection and billing.

Applying Linux High-Availability and Load Balancing Servers

461

Fig. 7. Left. Scheduling selection function. Right. VOD system status menu.

Our VOD system offers three types of load-balancing cluster solutions as shown in Figures 7-Left and 7-Right. Each utilizes the highest-quality, performance-optimized system of load balancing hardware, software and components. Fewest Connections: This technique routes requests to the server that is currently handling the smallest number of requests/connections. For example, if Server 1 is currently handling 20 requests, and Server 2 is currently handling 10 requests/connections, the next request/connection will be automatically routed to Server 2, since that server currently has the least number of active connections/requests. Round Robin: This technique routes requests to the next available server on a rotating basis. For example, incoming requests/connections are routed to Server 1, then Server 2, and nally Server 3 before starting again with Server 1. Weighted Fair: This technique routes requests to servers based upon their current request load and their performance capabilities. For example, If Server 1 is four times faster at handling requests than Server 2; the administrator factors this difference by routing 4 times as many performance loads to Server 1 than Server 2. The experimental environment is built using the following hardware and software congurations on master and backup nodes: CPU Intel PIII 1GHz * 2 CPUs, 512MB DDR memory, HD 30GB, OS RedHat Linux 8.0 and 9.0, application software LVS (Linux Virtual Server), The IPVS Netlter module for kernel 2.4, HA (HighAvailability)HeartBeat, WEB Apache and PHP, also RSYNC, IPVSADM, SUPER and REALCHK. The hardware and software congurations to work as redundancy are listed as: CPU Intel Celeron 900 MHz, 256MB memory, HD 30GB, OS RedHat Linux 8.0 and 9.0, application software LVS (Linux Virtual Server), the IPVS Netlter module for kernel 2.4, PVFS v1.6.0, pvfs-kernel v1.6.0, VOD vlc-0.6.1-1.i386.rpm and FFmpeg version 0.4.8, WEB Apache, PHP, and also, SUPER and RSYNC. The hardware and software conguration of database node (SQL Server) is: CPU Intel Celeron 900 MHz, 256MB DDR memory, HD 30GB, OS RedHat Linux 9.0, and the application software used is MySQL database.

462

C.T. Yang et al.

4 Conclusion
High-Availability (HA) and load balancing clusters are used when it is critical the content or service to be available and/or processed as fast as possible. Internet Service Providers or E-commerce web sites services require high availability, load balancing and scalability. In this paper, we integrated the technologies of High-Availability and Load Balancing in clusters of workstations, by combining features of both of the cluster types, increasing both the availability and scalability of services and resources. Nowadays, PC-based clusters with this technology are commonly used for web-based VOD servers.

References
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. LVS (Linux Virtual Server), http://www.linuxvirtualserver.org/ Apache Server, http://www.apache.org/ PHP programming, http://www.php.net/ HA (High Availability), http://www.linuxvirtualserver.org/HighAvailability.html Linux HA, http://www.linux-ha.org/ The OpenGFS Project, http://opengfs.org/ Sistinas Global File System (GFS), http://www.sistina.com/products gfs.htm GPFS, http://www-124.ibm.com/developerworks/opensource/gpfs/ General Parallel File System for Linux, http://www-1.ibm.com/servers/eserver/clusters/software/gpfs.html The Parallel Virtual File System Project, http://parlweb.parl.clemson.edu/pvfs/ Journal File System Technology for Linux, http://www-124.ibm.com/developerworks/oss/jfs/ VideoLan - Open Source Video Streaming Solution, http://www.videolan.org/ Sourceforge, http://ffmpeg.sourceforge.net/index.org.html MySQL database, http://www.mysql.com/

You might also like