0% found this document useful (0 votes)
71 views16 pages

Linux Virtual Server: Miroslav Siket Fio-Fs

This document discusses Linux Virtual Server (LVS), which provides load balancing and high availability for servers. It operates by routing connection requests to real servers behind a load balancer. The load balancer can be highly available itself through replication. LVS supports various load balancing algorithms and configurations like NAT, TUN, and DR to balance traffic across multiple real servers in local or wide area networks. It provides tools for monitoring server health and failing over to backup systems to ensure reliability.

Uploaded by

Nikki Khatri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views16 pages

Linux Virtual Server: Miroslav Siket Fio-Fs

This document discusses Linux Virtual Server (LVS), which provides load balancing and high availability for servers. It operates by routing connection requests to real servers behind a load balancer. The load balancer can be highly available itself through replication. LVS supports various load balancing algorithms and configurations like NAT, TUN, and DR to balance traffic across multiple real servers in local or wide area networks. It provides tools for monitoring server health and failing over to backup systems to ensure reliability.

Uploaded by

Nikki Khatri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

Linux Virtual Server

Miroslav Siket
FIO-FS

10/02/2004 ELFms meeting 1


Outline

 Solutions and comparison


 LVS (Linux Virtual Server)
 LVS solutions, high availability
 Scheduling possibilities
 Performance
 Deployment

10/02/2004 ELFms meeting 2


Definition of the problem

 Multiple clients (>100) accessing the same resource


 Effort to parallelize requests in a distributed
system (clusters, computer farms,…)
 Create transparent environment for the users
 Enable load balancing to increase efficiency and
speed
 Reliability

10/02/2004 ELFms meeting 3


Solutions
 DNS load balancing (BIND RR)
 Proxy servers (Squid, MS, Netscape, Apache)
 Reverse proxy (Apache)
 Custom built application balancing
 Hardware based (CISCO Load Director, intelligent
routers,...)
 Linux Virtual Server (LVS)

10/02/2004 ELFms meeting 4


What is LVS

 Scalable, highly available server built on cluster of


real servers
 Offers load balancing
 Transparent for users
 Can be used for WWW, ftp, ssh or any other
TCP/IP, UDP/IP protocol based services

10/02/2004 ELFms meeting 5


LVS – general schema


Idea is to have
transparent service
available to users

Should be scalable

Should be dynamical

Should provide fail
over mechanism

10/02/2004 ELFms meeting 6


Solutions with LVS

 Is based on “smart” kernel routing of packets


over IP

LVS-NAT LVS-TUN LVS-DR

Network Any LAN/WAN LAN

# of RealS Low(10-20) High High

Gateway Load Balancer Own router Own router

10/02/2004 ELFms meeting 7


LVS-NAT

 Requests translated by
load balancer

Allows internal network

Limited by the load
balancer

Limited by network
connection

Up to 10-20 real
servers

NAT (network address
translation)
10/02/2004 ELFms meeting 8
LVS-TUN


Load balancer
encapsulates IP packet,
sends it to real server

Real server replies
directly to client

Works on LAN/WAN

Scalable

TUN (Network
Tunneling) – using tunl
devices
10/02/2004 ELFms meeting 9
LVS-DR


Load balancer changes
MAC address and
broadcasts it to the real
server

Limited to LAN

Scalable

Replies go directly to
user

DR (direct routing)
using lo devices
10/02/2004 ELFms meeting 10
LVS Scheduling
 Round Robin  LBLC with Replication
 Wighted RR  Destination Hashing
 Least-Connection  Source hashing
 Weighted LC
 Locality-Based LC

LVS also provides support for persistency of connections.

10/02/2004 ELFms meeting 11


High availability

 Real servers are added/removed to/from the pool


by a monitoring daemon
 Load balancer can be replicated to allow fail over
to another (backup) load balancer (spoofing
master's IP address)
 Provides notification tools

10/02/2004 ELFms meeting 12


Fail over solution

10/02/2004 ELFms meeting 13


Requirements

 Kernel 2.4.23+ or patched previous kernels (part of the 2.6)


for load balancer
 In case of LVS-TUN and LVS-DR kernel patch for ARP-
hidden for real servers
 Standard Apache listening on Virtual IP and real IP
 Clients configured for Virtual IP
 Mon (standard monitoring server) and Heartbeat
 Fake (IP spoofing)
10/02/2004 ELFms meeting 14
Performance expectations

 I have tested 2 real servers + 1 load balancer (LVS


TUN and DR), with fail over – all OK
 20MB/s performance - below 10% CPU utilization
on LoadBalancer
 1Gbps+ performance for 100Mbit/s LB
 See http://www.linuxvirtualserver.org

10/02/2004 ELFms meeting 15


Deployment
 Possible deployment for the SWREP web servers
 Together with head nodes (Apache Proxy or Squid
Proxy) should provide stable, highly available and
scalable solution with desired throughput
 Possible other deployments where high availability
is required
 Used by linux.com, sourceforge.net,...
 Base for the RedHat's Piranha

10/02/2004 ELFms meeting 16

You might also like