You are on page 1of 10

MALAYSIAN PUBLIC SECTOR

OPEN SOURCE SOFTWARE (OSS)
PROGRAM

LINUX VIRTUAL SERVER
BENCHMARK REPORT
 MARCH 2008
Linux Virtual Server

COPYRIGHT

The copyright to this document is owned by the Government of Malaysia

2
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my
Linux Virtual Server

TABLE OF CONTENTS

Page
COPYRIGHT 2
TABLE OF CONTENTS 3

1. INTRODUCTION 4
2. PROBLEM DESCRIPTION 4
3. SCOPE OF WORK 4
4. SOFTWARE AND HARDWARE PROVIDED FROM OSCC 5
5. COMPARISON 6
5.1 IP LOAD BALANCING TECHNIQUES 6
5.2 CONNECTION SCHEDULE 8
6. RESULT AND CONCLUSION 9
7. REFERENCES 10

3
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my
Linux Virtual Server

1. INTRODUCTION

Clusters are usually deployed to improve performance and/or availability over that provided by a single
computer, while typically being much more cost-effective than single computers of comparable speed
or availability. In computing, load balancing is a technique used to spread workload among many
processes, computers, networks, disks or other resources, so that no single resource is overloaded. The
Linux Virtual Server (LVS) as an advanced load balancing solution can be used to build highly scalable
and highly available network services.

2. PROBLEM DESCRIPTION

Web-based application is one of the service provided at OSCC, MAMPU. Examples of web-based
application are OSCC portal home and Knowledge Bank. OSCC allocates two servers for web-based
applications. With increasing demands from users on OSS applications. OSCC's web-based servers are
going to be overwhelmed with workload and thus resulting in slower response times. A cost-effective
solution is needed to address this problem before it getting serious.

3. SCOPE OF WORK

The scope of work are as follows:


1. To identify suitable IP load balancing techniques using Linux Virtual Server to fully utilize the
OSCC's hardware capacity.
2. To identify suitable connection scheduling algorithm using Linux Virtual Server to fully utilize
the OSCC's hardware capacity.
3. To identify the IP load balancing technique and connection scheduling that could help to
increase network scalabality.

4
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my
Linux Virtual Server

4. SOFTWARE AND HARDWARE PROVIDED FROM OSCC

OSCC has allocated 2 unit of servers to be used for the project and both servers will have roughly the
same capacity. Both servers are fixed with two Network Interface Cards (NICs), one interface on the
Internet (public network) and one on the private network, enabling them to regulate traffic between the
two networks. One PC will be used as the load balancer. Load balancer will delegate tasks between the
two servers.

For each servers will be installed with CentOS5 as its operating system.

Figure 4.1 General architecture of LVS

5
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my
Linux Virtual Server

5. COMPARISON

5.1 IP LOAD BALANCING TECHNIQUES

The cluster running Linux Virtual Server acts as a load balancer of network connections from
clients which uses a single IP address for a service. Load balancer and servers are using IP load
balancing technique to communicate with each other.

Below is comparison table on IP load balancing techniques:

Linux Virtual Server via  Linux Virtual Server via  Linux Virtual Server via 


Network Address  IP Tunneling Direct Routing
Translation (NAT)

Technique  NAT allows a single IP tunneling is a techniques Real servers have their
definition device, such as a router, to to encapsulate IP datagram loopback alias interfaces
act as an agent between the within IP datagram, which configured with the virtual
public network and a allows datagrams destined IP address and the load
private network for one IP address to be balancer has an interfaces
wrapped and redirected to configured with the virtual
another IP address IP address to accept
incoming packets

Connection Load balancer and real  Load balancer and real Load balancer and the real
servers are interconnected  server are connected by servers must have one of
by hub or switch LAN or WAN their interfaces physically
linked by an uninterrupted
segment of LAN such as
hub or switch

Server  Servers support  Servers support LVS via Direct Routing


requirement Transmission Control  Transmission Control require the server OS has
Protocol/ Internet Protocol  Protocol/ Internet Protocol loopback alias interface
(TCP/IP) (TCP/IP) that does not do ARP
response

6
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my
Linux Virtual Server

Work flow LVS router receives the The load balancer tunnels The load balancer
request and routes it to the the request packets to the processes only the client-
appropriate server. Then, different servers, and the to-server half of a
the real server processes servers process the connection, and the
the request and returns the requests and return the response packets can
packets to the LVS router results to the client directly follow separate network
which uses NAT to replace routes to the clients
the address of the real
server in the packets with
the LVS routers public
Virtual IP address

Server gateway The load balancer will act Each real server can have Each real server can have
as gateway its own router as gateway its own router as gateway

Scalability Support minimum number Support large number of Support large number of
of servers servers servers

7
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my
Linux Virtual Server

5.2 CONNECTION SCHEDULE

The structure that the IP Virtual Server (IPVS) table takes depends on the scheduling algorithm
that the administrator chooses for any given virtual server. Below are comparison table on
connection scheduling algorithm:

Round-robin algorithm Weighted round-robin Least-connection


Algorithm algorithm

Definition Simplest scheduling The weighted round-robin Least-connection


algorithm directs the scheduling can treat the scheduling algorithm
network connections to the real severs of different directs network
different servers in the processing capacities connections with the least
cluster number of active
connections

Work flow The round-robin DNS Servers with higher Load balancer with least-
resolves the single domain weights receives new connection schedule will
to the different IP connections first and get distributes more requests
addresses, the scheduling more connections than to real server with fewer
granularity is per host, and servers with lower weights, active connections by
the caching of DNS hinder and servers with equal keeping track of live
the algorithm take effect. weights can get an equal connections to the real
Round-robin scheduling is distributions of new servers through the IP
based on first-come first- equations Virtual Server (IPVS)
served queuing table

Scheduling Static Dynamic Dynamic

Server capacity Each node should have Vary processing capacity Each node should have
equal processing capacity for each node because we equal processing capacity
(each node) because it would lead to could assign weight that because it would lead to
load imbalance indicates its processing load imbalance
capacity

8
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my
Linux Virtual Server

6. RESULT AND CONCLUSION

Reasons for using LVS:


1. The architecture of server cluster is fully transparent to end users, and the users interact with
the cluster system as if it were only a single high-performance virtual server.
2. Implementation of three-tier architecture which will prevent clients from directly contacting
servers directly, which may have security benefits by hiding the structure of the internal
network and preventing attacks on the kernel’s network stack.
3. High availability is provided by detecting node or daemon failures and reconfiguring the system 
appropriately.

After comparing IP load balancing techniques provided with the software and hardware available for
the project, we could conclude that Linux Virtual Server via IP Tunneling suit best for the project.
Below are the reasons for choosing LVS via IP Tunneling:
1. Since the load balancer only handle incoming request packets and real servers will response 
directly   to   the   clients,   hence   load   balancer   will   not   overloaded   with   work   and   it   increase 
scalability on the network
2. We also could build a virtual proxy server, because when the proxy servers get request, it can 
access the Internet directly to fetch objects and return them directly to the users. 

We will be using least-connection scheduling for the IPVS table. Below are the reasons for choosing
least-connection for the connection scheduling use in Linux Virtual Server:
1. The servers provided from OSCC have roughly the same capacity, hence it is suitable to apply
least-connection scheduling for the IPVS table.
2. Least-connection scheduling can direct end-users service requests to the servers that are least
busy and therefore it capable of providing fastest response times.
3. It could increase network scalability because it can delegate works better in the cluster system.

9
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my
Linux Virtual Server

7. REFERENCE

1. Linux Virtual Server Administration. CentOS. January 15, 2008. <http://www.centos.org/docs/5/


html/5.1/Virtual_Server_Administration/>
2. Zhang, Wensong. Linux Virtual Server for Scalable Network Service. National Laboratory for
Parallel & Distributed Processing, Hunan, China. November 2003. February 20, 2008.
<www.linuxvirtualserver.org/ols/lvs.ps.gz>
3. The Linux Virtual Server Project. February 22, 2008. <http://www.linuxvirtualserver.org>

10
Malaysian Public Sector Open Source Competency Centre (OSCC), 3rd Floor, Apt E302­E304, Lot 12076, Persiaran APEC, 
Enterprise Building, 63000 Cyberjaya Selangor, Malaysia
Ph:+603 83191200 Email: contact@oscc.org.my Website: http://www.oscc.org.my

You might also like