<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Linux_Virtual_Server</id>
	<title>Linux Virtual Server - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Linux_Virtual_Server"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Linux_Virtual_Server&amp;action=history"/>
	<updated>2026-04-19T04:13:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Linux_Virtual_Server&amp;diff=655681&amp;oldid=prev</id>
		<title>62.211.247.60 at 14:38, 16 June 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Linux_Virtual_Server&amp;diff=655681&amp;oldid=prev"/>
		<updated>2024-06-16T14:38:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Load-balancing software}}&lt;br /&gt;
{{Infobox software&lt;br /&gt;
| name                   = Linux Virtual Server&lt;br /&gt;
| title                  = &lt;br /&gt;
| logo                   = Lvslogo.png&lt;br /&gt;
| logo caption           = LVS official logo&lt;br /&gt;
| logo_size              = 200px&lt;br /&gt;
| logo_alt               = LVS official logo&lt;br /&gt;
| screenshot             = &amp;lt;!-- Image name is enough --&amp;gt;&lt;br /&gt;
| caption                = &lt;br /&gt;
| screenshot_size        = &lt;br /&gt;
| screenshot_alt         = &lt;br /&gt;
| collapsible            = &lt;br /&gt;
| author                 = Wensong Zhang&lt;br /&gt;
| developer              = et al.&lt;br /&gt;
| released               = {{Start date and age|1998|05}}&lt;br /&gt;
| discontinued           = &lt;br /&gt;
| latest release version = &lt;br /&gt;
| latest release date    = &amp;lt;!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --&amp;gt;&lt;br /&gt;
| latest preview version = &lt;br /&gt;
| latest preview date    = &amp;lt;!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --&amp;gt;&lt;br /&gt;
| programming language   = [[C (programming language)|C]]&lt;br /&gt;
| operating system       = [[Linux]]&lt;br /&gt;
| platform               = &lt;br /&gt;
| size                   = &lt;br /&gt;
| genre                  = [[Load balancing (computing)|load balancing]]&lt;br /&gt;
| license                = [[GNU General Public License]]&lt;br /&gt;
| website                = {{URL|http://www.LinuxVirtualServer.org}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Linux Virtual Server&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;LVS&amp;#039;&amp;#039;&amp;#039;) is [[Load balancing (computing)|load balancing]] software for [[Linux kernel]]&amp;amp;ndash;based operating systems.&lt;br /&gt;
&lt;br /&gt;
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 [[Computer cluster|clustering]] technology, which provides good scalability, reliability and serviceability.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
[[File:Wikipedia webrequest 2022.png|thumb|LVS as used by [[Wikimedia Foundation]] in 2022.]]&lt;br /&gt;
&lt;br /&gt;
The major work of the LVS project is now to develop advanced IP [[Load balancing (computing)|load balancing]] software (IPVS), application-level load balancing software (KTCPVS), and cluster management components.&lt;br /&gt;
&lt;br /&gt;
* [[IP Virtual Server|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.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 | url = http://www.linuxvirtualserver.org/software/ipvs.html&lt;br /&gt;
 | title = IPVS Software - Advanced Layer-4 Switching&lt;br /&gt;
 | date = 2011-02-08 | accessdate = 2014-01-12&lt;br /&gt;
 | publisher = linuxvirtualserver.org&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* KTCPVS: implements application-level load balancing inside the Linux kernel, {{As of|2011|02|lc=yes}} still under development.&amp;lt;ref&amp;gt;{{cite web|author=Wensong Zhang |url=http://www.linuxvirtualserver.org/software/ktcpvs/ktcpvs.html |title=KTCPVS Software - Application-Level Load Balancing |publisher=Linuxvirtualserver.org |date=2011-02-08 |accessdate=2014-03-25}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LVS can be used for building highly scalable and [[High-availability cluster|highly available]] network services, such as web, email, media and [[VoIP]] services, and integrating scalable network services into large-scale reliable [[e-commerce]] or [[e-government]] applications.  LVS-based solutions already have been deployed in many real applications throughout the world, including [[Wikipedia]].&lt;br /&gt;
&lt;br /&gt;
The LVS components depend upon the Linux [[Netfilter]] framework, and its source code is available in the &amp;lt;code&amp;gt;net/netfilter/ipvs&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;/proc&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The [[userland (computing)|userland]] utility program used to configure LVS is called [[ipvsadm]], which requires [[superuser]] privileges to run.&lt;br /&gt;
&lt;br /&gt;
=== Schedulers ===&lt;br /&gt;
LVS implements several balancing schedulers, listed below with the relevant source files:&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 | url = http://www.linuxvirtualserver.org/docs/scheduling.html&lt;br /&gt;
 | title = Job Scheduling Algorithms in Linux Virtual Server&lt;br /&gt;
 | date = 2011-02-08 | accessdate = 2013-11-24&lt;br /&gt;
 | publisher = linuxvirtualserver.org&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Round-robin (&amp;lt;code&amp;gt;ip_vs_rr.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Weighted round-robin (&amp;lt;code&amp;gt;ip_vs_wrr.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Least-connection (&amp;lt;code&amp;gt;ip_vs_lc.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Weighted least-connection (&amp;lt;code&amp;gt;ip_vs_wlc.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Locality-based least-connection (&amp;lt;code&amp;gt;ip_vs_lblc.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Locality-based least-connection with replication (&amp;lt;code&amp;gt;ip_vs_lblcr.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Destination hashing (&amp;lt;code&amp;gt;ip_vs_dh.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Source hashing (&amp;lt;code&amp;gt;ip_vs_sh.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Shortest expected delay (&amp;lt;code&amp;gt;ip_vs_sed.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Never queue (&amp;lt;code&amp;gt;ip_vs_nq.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Maglev hashing (&amp;lt;code&amp;gt;ip_vs_mh.c&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
Commonly used terms include the following:&amp;lt;ref name=&amp;quot;Bob&amp;quot;&amp;gt;{{cite web&lt;br /&gt;
 | url = http://bobcares.com/blog/linux-virtual-server-load-balance-your-networked-services/&lt;br /&gt;
 | title = Linux Virtual Server: Load Balance Your Networked Services&lt;br /&gt;
 | year = 2008 | accessdate = 2013-11-24&lt;br /&gt;
 | publisher = bobcares.com&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;LVS director&amp;#039;&amp;#039;: load balancer that receives all incoming client requests for services and directs them to a specific &amp;quot;real server&amp;quot; to handle the request&lt;br /&gt;
* &amp;#039;&amp;#039;Real servers&amp;#039;&amp;#039;: nodes that make up an LVS cluster which are used to provide services on the behalf of the cluster&lt;br /&gt;
* &amp;#039;&amp;#039;Client computers&amp;#039;&amp;#039;: computers requesting services from the virtual server&lt;br /&gt;
* &amp;#039;&amp;#039;VIP (Virtual IP address)&amp;#039;&amp;#039;: the IP address used by the director to provide services to client computers&lt;br /&gt;
* &amp;#039;&amp;#039;RIP (Real IP address)&amp;#039;&amp;#039;: the IP address used to connect to the cluster nodes&lt;br /&gt;
* &amp;#039;&amp;#039;DIP (Directors IP address)&amp;#039;&amp;#039;: the IP address used by the director to connect to network of real IP addresses&lt;br /&gt;
* &amp;#039;&amp;#039;CIP (Client IP address)&amp;#039;&amp;#039;: the IP address assigned to a client computer, that it uses as the source IP address for requests being sent to the cluster&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Setting up a virtual [[Hypertext Transfer Protocol|HTTP]] server with two real servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ipvsadm -A -t 192.168.0.1:80 -s rr&lt;br /&gt;
ipvsadm -a -t 192.168.0.1:80 -r 172.16.0.1:80 -m&lt;br /&gt;
ipvsadm -a -t 192.168.0.1:80 -r 172.16.0.2:80 -m&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command assigns [[Transmission Control Protocol|TCP]] port 80 on [[IP address]] [[private network|192.168.0.1]] to the virtual server.  The chosen scheduling algorithm for [[Load balancing (computing)|load balancing]] is [[Round-robin scheduling|round-robin]] (&amp;lt;code&amp;gt;-s rr&amp;lt;/code&amp;gt;).  The second and third commands are adding IP addresses of real servers to the LVS setup.  The forwarded network packets shall be masked (&amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt;).&amp;lt;ref&amp;gt;{{cite news |last1=Peter |first1=Jeff |title=Understanding Virtual Server |url=https://xaro.net/blog/understanding-vps-vs-vds-guide/ |access-date=18 June 2023}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Querying the status of the above configured LVS setup:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# ipvsadm -L -n&lt;br /&gt;
IP Virtual Server version 1.0.8 (size=65536)&lt;br /&gt;
Prot LocalAddress:Port Scheduler Flags&lt;br /&gt;
  -&amp;gt; RemoteAddress:Port           Forward Weight ActiveConn InActConn&lt;br /&gt;
TCP  192.168.0.1:80 rr&lt;br /&gt;
  -&amp;gt; 172.16.0.2:80                Masq    1      3          1&lt;br /&gt;
  -&amp;gt; 172.16.0.1:80                Masq    1      4          0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
{{Portal|Linux|Free and open-source software}}&lt;br /&gt;
* [[IP Virtual Server]]&lt;br /&gt;
* [[Netfilter]] and [[nftables]]&lt;br /&gt;
* [[Network scheduler]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* {{Official website|http://www.LinuxVirtualServer.org/}}&lt;br /&gt;
* [http://kb.linuxvirtualserver.org/wiki/Main_Page Linux Virtual Server Configuration Wiki]&lt;br /&gt;
* [http://publib-b.boulder.ibm.com/Redbooks.nsf/9445fa5b416f6e32852569ae006bb65f/e8417f0abc3cadaf85256d40004f31b8?OpenDocument&amp;amp;Highlight=0,SG247034 IBM eServer BladeCenter, Linux, and Open Source: Blueprint for e-business on demand] {{Webarchive|url=https://web.archive.org/web/20220811174534/https://publib-b.boulder.ibm.com/Redbooks.nsf/9445fa5b416f6e32852569ae006bb65f/e8417f0abc3cadaf85256d40004f31b8?OpenDocument&amp;amp;Highlight=0,SG247034 |date=2022-08-11 }} (includes LVS as a component)&lt;br /&gt;
&lt;br /&gt;
{{Linux kernel}}&lt;br /&gt;
&lt;br /&gt;
[[Category:High-availability cluster computing]]&lt;br /&gt;
[[Category:Free network-related software]]&lt;br /&gt;
[[Category:Internet software for Linux]]&lt;br /&gt;
[[Category:Linux-only free software]]&lt;br /&gt;
[[Category:Parallel computing]]&lt;/div&gt;</summary>
		<author><name>62.211.247.60</name></author>
	</entry>
</feed>