Linux Virtual Server Setup

Fore June

  • Introduction
  • Lab 1 -- Building Linux Kernel
  • Lab 2 -- Installing LVS Admin. Package
  • Lab 3 -- Setting Up Linux Virtual Server
  • Lab 4 -- Setting Up LVS/Tunnel Cluster
  • Lab 5 -- Building a Web Server Cluster
  • Lab 6 -- Installing Heartbeat and Ldirector
  • Lab 7 -- Configuring Heartbeat and Ldirector
  • Introduction


    The Linux Virtual Server is a highly scalable and highly available server built on a cluster of real servers, running on the Linux operating system with load balancing mechanisms. The architecture of the cluster is transparent to end users who can only see a single machine which is referred to as a virtual server.

    As a general term, scalable means capable of being scaled. Here, it means that if your system is scalable, you can expand or contract it without altering the fundamental properties of the system. A highly scalable computer network allows you to add more machines to the system or take away some without affecting the normal functions of the network. In other words, the Linux Virtual Server allows you to add and remove machines from the system without shutting down the system at any instant.

    The word highly here basically refers to its high capability or dynamic range. We say that a scale has a very high dynamic range if it can weigh something very light, say 0.01 gram and something very heavy, say 1 million kilograms. In the same sense, a highly scalable system can work well with a very small number of machines when the load is light and a very large number of machines when the load is heavy.

    If your machine is down then it is not available to you. If it is running normally, it is available to you. If your machine always runs and almost never goes down, then we say that it is highly available to you. In other words, users should have the same easy access to files and system resources, irrespective of their physical locations. System failures or regularly scheduled activities such as backups or maintenance should not result in the unavailability of files and resources. You may wonder how this can be achieved as any PC may go down; it may break because of the worn-out of the hard drive or some other components and that's beyond our control. The secret lies in making use of redundancy to maintain high availability. When one machine breaks down for some reasons, another machine can take over its task. We can then repair the broken machine and let it join the system after the repair to reclaim the tasks and maintain the redundancy.

    The term load balancing here refers to the case that a system may consist of serveral machines. Load balancing means that the load will be shared among the machines in desired ratios. This differs from using a DNS ( Domain Name System ) name server to achieve a similar effect where a name server can point a full host-domain name like www.abc.com to the different IPs of several machines and requests to www.abc.com will then be directed to the machines in a round-robin manner. The LVS approach is a lot more sophisticated. First, in the simple DNS rotating IP approach, the name server will direct requests to a machine in the system even if it is down. This means that a user may find that www.abc.com is down even though other machines in the system are running normally. Second, you cannot remove a machine at will by deleting its corresponding IP entry in the name server; the cache in DNS will direct requests to the deleted IP for a substantial period of time after its deletion.

    Most of the information concerning Linux Virtual Server can be found in the LVS web site
    www.linuxvirtualserver.org, and the Linux high availability web site, http://www.linux-ha.org

    To start, you can download the related software packages from the LVS site. Note that the working of the LVS software packages depends on the Linux kernel version. It is important that you first obtain a clean and correct kernel version. It won't work if your Linux kernel version does not match that of the version sepcified by the LVS software package.

    Next >>