ArticleslgStudy

computer science

Linux Virtual Server

Linux Virtual Server is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Linux Virtual Server rather than just read about it. In short: Linux Virtual Server (LVS) is load balancing software for Linux kernel–based operating systems. LVS is a free and open-source project started by Wensong Zhang in May 1998, subject to the requirements of the GNU General Public License (GPL), version 2.

Linux Virtual Server — main illustration
Linux Virtual Server — illustration

Key takeaways

  • Linux Virtual Server belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Linux Virtual Server to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Linux Virtual Server from memory before moving on to harder problems.

Reference excerpt

Linux Virtual Server (LVS) is load balancing software for Linux kernel–based operating systems. LVS is a free and open-source project started by Wensong Zhang in May 1998, subject to the requirements of the GNU General Public License (GPL), version 2. The mission of the project is to build a high-performance and highly available server for Linux using clustering technology, which provides good scalability, reliability and serviceability.

Overview

The major work of the LVS project is now to develop advanced IP load balancing software (IPVS), application-level load balancing software (KTCPVS), and cluster management components.

IPVS: an advanced IP load balancing software implemented inside the Linux kernel. The IP Virtual Server code is merged into versions 2.4.x and newer of the Linux kernel mainline. KTCPVS: implements application-level load balancing inside the Linux kernel, as of February 2011 still under development. LVS can be used for building highly scalable and highly available network services, such as web, email, media and VoIP services, and integrating scalable network services into large-scale e-commerce or e-government applications. LVS-based solutions already have been deployed in many real applications throughout the world, including Wikipedia. The LVS components depend upon the Linux Netfilter framework, and its source code is available in the net/netfilter/ipvs subdirectory within the Linux kernel source. LVS is able to handle UDP, TCP layer-4 protocols as well as FTP passive connection by inspecting layer-7 packets. It provides a hierarchy of counters in the /proc directory. The userland utility program used to configure LVS is called ipvsadm, which requires superuser privileges to run.

Schedulers LVS implements several balancing schedulers, listed below with the relevant source files:

Round-robin (ip_vs_rr.c) Weighted round-robin (ip_vs_wrr.c) Least-connection (ip_vs_lc.c) Weighted least-connection (ip_vs_wlc.c) Locality-based least-connection (ip_vs_lblc.c) Locality-based least-connection with replication (ip_vs_lblcr.c) Destination hashing (ip_vs_dh.c) Source hashing (ip_vs_sh.c) Shortest expected delay (ip_vs_sed.c) Never queue (ip_vs_nq.c) Maglev hashing (ip_vs_mh.c)

Glossary Commonly used terms include the following:

LVS director: load balancer that receives all incoming client requests for services and directs them to a specific "real server" to handle the request Real servers: nodes that make up an LVS cluster which are used to provide services on the behalf of the cluster Client computers: computers requesting services from the virtual server VIP (Virtual IP address): the IP address used by the director to provide services to client computers RIP (Real IP address): the IP address used to connect to the cluster nodes DIP (Directors IP address): the IP address used by the director to connect to network of real IP addresses CIP (Client IP address): the IP address assigned to a client computer, that it uses as the source IP address for requests being sent to the cluster

Examples Setting up a virtual HTTP server with two real servers:

The first command assigns TCP port 80 on IP address 192.168.0.1 to the virtual server. The chosen scheduling algorithm for load balancing is round-robin (-s rr). The second and third commands are adding IP addresses of real servers to the LVS setup. The forwarded network packets shall be masked (-m). Querying the status of the above configured LVS setup:

See also

IP Virtual Server Netfilter and nftables Network scheduler

References

External links Official website Linux Virtual Server Configuration Wiki IBM eServer BladeCenter, Linux, and Open Source: Blueprint for e-business on demand Archived 2022-08-11 at the Wayback Machine (includes LVS as a component)

Illustrations

Linux Virtual Server illustration
Linux Virtual Server: LVS as used by Wikimedia Foundation in 2022.
LVS as used by Wikimedia Foundation in 2022.

Worked examples

Example 1 — a first encounter with Linux Virtual Server

Start with the simplest possible case. Write down what Linux Virtual Server claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Linux Virtual Server before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Linux Virtual Server ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Linux Virtual Server

In research
Linux Virtual Server appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Linux Virtual Server in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Linux Virtual Server is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free network-related software, High-availability cluster computing, Internet software for Linux, so understanding it makes those chapters shorter.
In everyday life
Look for Linux Virtual Server outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Linux Virtual Server” →

How to study Linux Virtual Server in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Linux Virtual Server means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Linux Virtual Server out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Linux Virtual Server in simple terms?

Linux Virtual Server (LVS) is load balancing software for Linux kernel–based operating systems. LVS is a free and open-source project started by Wensong Zhang in May 1998, subject to the requirements of the GNU General Public License (GPL), version 2.

Why does Linux Virtual Server matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Linux Virtual Server?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Linux Virtual Server.

Tags

  • Free network-related software
  • High-availability cluster computing
  • Internet software for Linux
  • Linux-only free software
  • Parallel computing

Keep exploring