<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://kb.linuxvirtualserver.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Galbum</id>
		<title>LVSKB - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://kb.linuxvirtualserver.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Galbum"/>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki/Special:Contributions/Galbum"/>
		<updated>2026-05-01T13:15:25Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=Net-SNMP-LVS-Module&amp;diff=5803</id>
		<title>Net-SNMP-LVS-Module</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=Net-SNMP-LVS-Module&amp;diff=5803"/>
				<updated>2009-01-25T12:01:38Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* Extrenal Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== GENERAL ==&lt;br /&gt;
net-snmpd-lvs-module is a dynamicaly loadable shared object for SNMP to get the configuration and some statistical information from the Linux kernel with [[IPVS|IP virtual server]] support.&lt;br /&gt;
&lt;br /&gt;
== INSTALLATION ==&lt;br /&gt;
Get the source for this module ([[media:Net-snmp-lvs-module-0.0.4.tar.gz|local copy]] or [http://www.loadbalancer.org/download/SNMP/net-snmp-lvs-module-0.0.4.tar.gz Alternate source location]). From http://www.linuxvirtualserver.org/software/ipvs.html download the the correct version of ipvsadm, for kernel 2.6 use ipvsadm-1.24 or later, for kernel 2.4 use ipvsadm-1.21. Extract '''ipvsadm-''version''.tar.gz''', build the library and copy the subtree '''libipvs''' into the module's working directory.&lt;br /&gt;
&lt;br /&gt;
Check that the Linux kernel is available under '''/usr/src/linux'''. Install net-snmp and its development headers and libraries. Invoke '''make''', this should build '''lvs.so'''. Copy LVS-MIB.txt and OC-MIB.txt to '''/usr/share/snmp/mibs/'''.&lt;br /&gt;
&lt;br /&gt;
Check that the new MIB is visible by invoking&lt;br /&gt;
 shell&amp;gt; snmptranslate -m LVS-MIB -On -IR lvsServiceEntry,&lt;br /&gt;
this should return '''.1.3.6.1.4.1.8225.4711.18.1'''&lt;br /&gt;
Copy '''lvs.so''' to '''/usr/lib/libnetsnmplvs.so''' and add the following line to&lt;br /&gt;
'''/etc/snmp/snmpd.conf''':&lt;br /&gt;
 dlmod lvs /usr/lib/libnetsnmplvs.so&lt;br /&gt;
Restart your snmpd.&lt;br /&gt;
&lt;br /&gt;
Try if everything works invoking:&lt;br /&gt;
 shell&amp;gt; snmpwalk -c public -v 2c -m LVS-MIB localhost 1.3.6.1.4.1.8225.4711&lt;br /&gt;
 LVS-MIB::lvsVersion.0 = STRING: &amp;quot;1.2.0&amp;quot;&lt;br /&gt;
 LVS-MIB::lvsNumServices.0 = INTEGER: 2&lt;br /&gt;
 LVS-MIB::lvsHashTableSize.0 = INTEGER: 4096&lt;br /&gt;
 LVS-MIB::lvsTcpTimeOut.0 = INTEGER: 900&lt;br /&gt;
 LVS-MIB::lvsTcpFinTimeOut.0 = INTEGER: 120&lt;br /&gt;
 LVS-MIB::lvsUdpTimeOut.0 = INTEGER: 300&lt;br /&gt;
 LVS-MIB::lvsDaemonState.0 = INTEGER: none(0)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
In case you want to add additional snmp-values to your MIB:&lt;br /&gt;
Set export MIBS=ALL and create skeleton with&lt;br /&gt;
 shell&amp;gt; mib2c -c mib2c.interate.conf lvsRealTable&lt;br /&gt;
or&lt;br /&gt;
 shell&amp;gt; mib2c -c mib2c.interate.conf lvsServiceTable&lt;br /&gt;
this should create a file '''lvsRealTable.c''' and/or '''lvsServiceTable.c'''.&lt;br /&gt;
Use the generated code as a template for '''lvs.c''' and populate the missing parts.&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
The code for this module currently is maintained by Jacob Rief. This code is based on ucd-snmpd-lvs written by Romeo Benzoni in 2002 and never modified since. As that code did not compile with the newer net-snmp headers, I decided to rewrite the complete code. The only unchanged parts from the ucd-snmpd-lvs project are LVS-MIB.txt and OC-MIB.txt.&lt;br /&gt;
&lt;br /&gt;
== Extrenal Links ==&lt;br /&gt;
The official site does not exist any more, since I left that company.&lt;br /&gt;
If somebody gives me access to the repository, I will maintain the module there, otherwise I will have to create one at Google-code.&lt;br /&gt;
&lt;br /&gt;
[[Category:LVS Software]]&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=Net-SNMP-LVS-Module&amp;diff=5802</id>
		<title>Net-SNMP-LVS-Module</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=Net-SNMP-LVS-Module&amp;diff=5802"/>
				<updated>2009-01-25T12:00:03Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* INSTALLATION */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== GENERAL ==&lt;br /&gt;
net-snmpd-lvs-module is a dynamicaly loadable shared object for SNMP to get the configuration and some statistical information from the Linux kernel with [[IPVS|IP virtual server]] support.&lt;br /&gt;
&lt;br /&gt;
== INSTALLATION ==&lt;br /&gt;
Get the source for this module ([[media:Net-snmp-lvs-module-0.0.4.tar.gz|local copy]] or [http://www.loadbalancer.org/download/SNMP/net-snmp-lvs-module-0.0.4.tar.gz Alternate source location]). From http://www.linuxvirtualserver.org/software/ipvs.html download the the correct version of ipvsadm, for kernel 2.6 use ipvsadm-1.24 or later, for kernel 2.4 use ipvsadm-1.21. Extract '''ipvsadm-''version''.tar.gz''', build the library and copy the subtree '''libipvs''' into the module's working directory.&lt;br /&gt;
&lt;br /&gt;
Check that the Linux kernel is available under '''/usr/src/linux'''. Install net-snmp and its development headers and libraries. Invoke '''make''', this should build '''lvs.so'''. Copy LVS-MIB.txt and OC-MIB.txt to '''/usr/share/snmp/mibs/'''.&lt;br /&gt;
&lt;br /&gt;
Check that the new MIB is visible by invoking&lt;br /&gt;
 shell&amp;gt; snmptranslate -m LVS-MIB -On -IR lvsServiceEntry,&lt;br /&gt;
this should return '''.1.3.6.1.4.1.8225.4711.18.1'''&lt;br /&gt;
Copy '''lvs.so''' to '''/usr/lib/libnetsnmplvs.so''' and add the following line to&lt;br /&gt;
'''/etc/snmp/snmpd.conf''':&lt;br /&gt;
 dlmod lvs /usr/lib/libnetsnmplvs.so&lt;br /&gt;
Restart your snmpd.&lt;br /&gt;
&lt;br /&gt;
Try if everything works invoking:&lt;br /&gt;
 shell&amp;gt; snmpwalk -c public -v 2c -m LVS-MIB localhost 1.3.6.1.4.1.8225.4711&lt;br /&gt;
 LVS-MIB::lvsVersion.0 = STRING: &amp;quot;1.2.0&amp;quot;&lt;br /&gt;
 LVS-MIB::lvsNumServices.0 = INTEGER: 2&lt;br /&gt;
 LVS-MIB::lvsHashTableSize.0 = INTEGER: 4096&lt;br /&gt;
 LVS-MIB::lvsTcpTimeOut.0 = INTEGER: 900&lt;br /&gt;
 LVS-MIB::lvsTcpFinTimeOut.0 = INTEGER: 120&lt;br /&gt;
 LVS-MIB::lvsUdpTimeOut.0 = INTEGER: 300&lt;br /&gt;
 LVS-MIB::lvsDaemonState.0 = INTEGER: none(0)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
In case you want to add additional snmp-values to your MIB:&lt;br /&gt;
Set export MIBS=ALL and create skeleton with&lt;br /&gt;
 shell&amp;gt; mib2c -c mib2c.interate.conf lvsRealTable&lt;br /&gt;
or&lt;br /&gt;
 shell&amp;gt; mib2c -c mib2c.interate.conf lvsServiceTable&lt;br /&gt;
this should create a file '''lvsRealTable.c''' and/or '''lvsServiceTable.c'''.&lt;br /&gt;
Use the generated code as a template for '''lvs.c''' and populate the missing parts.&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
The code for this module currently is maintained by Jacob Rief. This code is based on ucd-snmpd-lvs written by Romeo Benzoni in 2002 and never modified since. As that code did not compile with the newer net-snmp headers, I decided to rewrite the complete code. The only unchanged parts from the ucd-snmpd-lvs project are LVS-MIB.txt and OC-MIB.txt.&lt;br /&gt;
&lt;br /&gt;
== Extrenal Links ==&lt;br /&gt;
Official site: http://homes.tiscover.com/jrief/net-snmp-lvs-module/  (unavailable as of13 July 2008)&lt;br /&gt;
&lt;br /&gt;
[[Category:LVS Software]]&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=5752</id>
		<title>SorryServer</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=5752"/>
				<updated>2008-01-14T13:15:23Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* Setting up a Sorry-Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up a Sorry-Server ==&lt;br /&gt;
&lt;br /&gt;
Sometime all of your real-servers might be down or overloaded. This can be due to a scheduled maintainace interval,&lt;br /&gt;
multiple hardware failure, badly written dynamic web-content, broken databases or script kiddies bringing your site down.&lt;br /&gt;
In such a situation it is much more polite to tell your customers that you are sorry but your site currently&lt;br /&gt;
is down, rather than just being unavailable.&lt;br /&gt;
&lt;br /&gt;
To set up such a webserver you normally would serve only some static content telling your customers that&lt;br /&gt;
you are sorry, but your web-services currently are not available. However the requests your customers send,&lt;br /&gt;
are regular URLs which are not resolvable by your Sorry-Server, and therefore would be answered with an&lt;br /&gt;
Error-Code: '''404 - Not Found'''. This Error-Code can be very annoying, if at the moment of the outage a&lt;br /&gt;
robot (such as Googlebot) is indexing your webpages. In such a situation most of your webpages&lt;br /&gt;
will fall out of the Google-index and your web-site might have to wait for up to a week to return back to&lt;br /&gt;
the Google-index, depending on the number visits of Googlebot per month.&lt;br /&gt;
&lt;br /&gt;
== Using TUX as Sorry-Server ==&lt;br /&gt;
[http://www.redhat.com/docs/manuals/tux/TUX-2.2-Manual/ TUX] is a tiny webserver which runs inside the Linux&lt;br /&gt;
kernel and is therefore predestined as a Sorry-Server. If your Loadbalancer is able to pass your web-traffic to&lt;br /&gt;
a number of real-servers, TUX running on the Loadbalancer is able to handle all that traffic by itself.&lt;br /&gt;
&lt;br /&gt;
The only precaution using TUX is not to send a Status '''200 - Ok''' neither an Error-Code '''404 - Not Found'''&lt;br /&gt;
as as Sorry-Page. The best fitting Error-Code to send in such a situation is '''502 - Server Overloaded'''.&lt;br /&gt;
&lt;br /&gt;
However this is not the default behaviour, nor can TUX be configured to do so. You must apply a tiny patch onto&lt;br /&gt;
the TUX-kernel-code, recompile that kernel-module and reinstall it onto your Loadbalancer.&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.4:&lt;br /&gt;
 diff -u kernel-2.4.21/linux-2.4.21/net/tux/proto_http.c linux-2.4.21-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.4.21/net/tux/proto_http.c     2005-03-07 15:09:45.000000000 +0100&lt;br /&gt;
 +++ linux-2.4.21-tux502/net/tux/proto_http.c    2005-03-07 15:08:13.000000000 +0100&lt;br /&gt;
 @@ -1172,7 +1172,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1838,7 +1838,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.6:&lt;br /&gt;
 diff -ur linux-2.6.9/net/tux/proto_http.c linux-2.6.9-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.6.9/net/tux/proto_http.c    2005-03-15 12:08:56.660827776 +0100&lt;br /&gt;
 +++ linux-2.6.9-tux502/net/tux/proto_http.c     2005-03-15 13:13:49.437035840 +0100&lt;br /&gt;
 @@ -1174,7 +1174,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1840,7 +1840,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
== Running the Sorry-Server ==&lt;br /&gt;
First start the TUX kernel-thread, by invoking &lt;br /&gt;
 /etc/init.d/tux start&lt;br /&gt;
The Sorry-Server can run all the time, even if you don't need it.&lt;br /&gt;
&lt;br /&gt;
In case all of your real-servers are down, you must reroute the traffic onto the Sorry-Server. First flush the Real-Server&lt;br /&gt;
Tables of your [[IPVS]] invoking &lt;br /&gt;
 ipvsadm -d -t ''service-address'' -r ''server-address''&lt;br /&gt;
for each of your real-servers. Next add a route the web-traffic onto the Sorry-Server, this normally is done by invoking &lt;br /&gt;
 ipvsadm -a -t ''service-address'' -r 127.0.0.1:80&lt;br /&gt;
once. All web-traffic now is redirected onto the Sorry-Server.&lt;br /&gt;
&lt;br /&gt;
Depending on where the TUX-configuration says to have its '''DOCUMENTROOT''', go to that directory and edit the file '''404.html''' adding some text such as ''Momentary system interruption''. You may also add stylesheet- and image-files to the Sorry-Server DOCUMENTROOT, you should however delete any '''index.html''' file since this would be served by default and with a HTTP-Status '''200 - OK'''. This is certainly not your intention.&lt;br /&gt;
&lt;br /&gt;
== Using keepalived ==&lt;br /&gt;
The [http://www.keepalived.org/ keepalived] is a program to check real-servers and manage the [[IPVS]]-Tables accordingly. [[Keepalived]] can be configured to automatically reroute all the web-traffic onto a Sorry-Server in case all real-servers are down. Simply add this line to each '''virtual_server''' section in the keepalived's configuration file:&lt;br /&gt;
 virtual_server ''service_address'' {&lt;br /&gt;
         ''...snip...''&lt;br /&gt;
         sorry_server 127.0.0.1 80&lt;br /&gt;
         ''...snip...''&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
TUX is a Linux kernel-project maintained by [http://www.redhat.com RedHat].&lt;br /&gt;
&lt;br /&gt;
This patch is maintained by Jacob Rief.&lt;br /&gt;
&lt;br /&gt;
[[Category:LVS Software]]&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=5751</id>
		<title>SorryServer</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=5751"/>
				<updated>2008-01-14T12:24:38Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* CREDITS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up a Sorry-Server ==&lt;br /&gt;
&lt;br /&gt;
Sometime all of your real-servers might be down or overloaded. This can be due to a mantainace interval,&lt;br /&gt;
hardware failure, badly written dynamic web-content, broken databases or script kiddies bringing your site down.&lt;br /&gt;
In such a situation it is much more polite to tell your customers that you are sorry but your site currently&lt;br /&gt;
is down, rather than just being unavailable.&lt;br /&gt;
&lt;br /&gt;
To set up such a webserver you normally would serve only some static content telling your customers that&lt;br /&gt;
you are sorry, but your web-services currently are not available. However the requests your customers send,&lt;br /&gt;
are regular URLs which are not resolvable by your Sorry-Server, and therefore would be answered with an&lt;br /&gt;
Error-Code: '''404 - Not Found'''. This Error-Code can be very annoying, if at the moment of the outage a&lt;br /&gt;
robot (such as Googlebot) is indexing your webpages. In such a situation most of your webpages&lt;br /&gt;
will fall out of the Google-index and your web-site might have to wait for up to a week to return back to&lt;br /&gt;
the Google-index, depending on the number visits of Googlebot per month.&lt;br /&gt;
&lt;br /&gt;
== Using TUX as Sorry-Server ==&lt;br /&gt;
[http://www.redhat.com/docs/manuals/tux/TUX-2.2-Manual/ TUX] is a tiny webserver which runs inside the Linux&lt;br /&gt;
kernel and is therefore predestined as a Sorry-Server. If your Loadbalancer is able to pass your web-traffic to&lt;br /&gt;
a number of real-servers, TUX running on the Loadbalancer is able to handle all that traffic by itself.&lt;br /&gt;
&lt;br /&gt;
The only precaution using TUX is not to send a Status '''200 - Ok''' neither an Error-Code '''404 - Not Found'''&lt;br /&gt;
as as Sorry-Page. The best fitting Error-Code to send in such a situation is '''502 - Server Overloaded'''.&lt;br /&gt;
&lt;br /&gt;
However this is not the default behaviour, nor can TUX be configured to do so. You must apply a tiny patch onto&lt;br /&gt;
the TUX-kernel-code, recompile that kernel-module and reinstall it onto your Loadbalancer.&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.4:&lt;br /&gt;
 diff -u kernel-2.4.21/linux-2.4.21/net/tux/proto_http.c linux-2.4.21-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.4.21/net/tux/proto_http.c     2005-03-07 15:09:45.000000000 +0100&lt;br /&gt;
 +++ linux-2.4.21-tux502/net/tux/proto_http.c    2005-03-07 15:08:13.000000000 +0100&lt;br /&gt;
 @@ -1172,7 +1172,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1838,7 +1838,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.6:&lt;br /&gt;
 diff -ur linux-2.6.9/net/tux/proto_http.c linux-2.6.9-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.6.9/net/tux/proto_http.c    2005-03-15 12:08:56.660827776 +0100&lt;br /&gt;
 +++ linux-2.6.9-tux502/net/tux/proto_http.c     2005-03-15 13:13:49.437035840 +0100&lt;br /&gt;
 @@ -1174,7 +1174,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1840,7 +1840,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
== Running the Sorry-Server ==&lt;br /&gt;
First start the TUX kernel-thread, by invoking &lt;br /&gt;
 /etc/init.d/tux start&lt;br /&gt;
The Sorry-Server can run all the time, even if you don't need it.&lt;br /&gt;
&lt;br /&gt;
In case all of your real-servers are down, you must reroute the traffic onto the Sorry-Server. First flush the Real-Server&lt;br /&gt;
Tables of your [[IPVS]] invoking &lt;br /&gt;
 ipvsadm -d -t ''service-address'' -r ''server-address''&lt;br /&gt;
for each of your real-servers. Next add a route the web-traffic onto the Sorry-Server, this normally is done by invoking &lt;br /&gt;
 ipvsadm -a -t ''service-address'' -r 127.0.0.1:80&lt;br /&gt;
once. All web-traffic now is redirected onto the Sorry-Server.&lt;br /&gt;
&lt;br /&gt;
Depending on where the TUX-configuration says to have its '''DOCUMENTROOT''', go to that directory and edit the file '''404.html''' adding some text such as ''Momentary system interruption''. You may also add stylesheet- and image-files to the Sorry-Server DOCUMENTROOT, you should however delete any '''index.html''' file since this would be served by default and with a HTTP-Status '''200 - OK'''. This is certainly not your intention.&lt;br /&gt;
&lt;br /&gt;
== Using keepalived ==&lt;br /&gt;
The [http://www.keepalived.org/ keepalived] is a program to check real-servers and manage the [[IPVS]]-Tables accordingly. [[Keepalived]] can be configured to automatically reroute all the web-traffic onto a Sorry-Server in case all real-servers are down. Simply add this line to each '''virtual_server''' section in the keepalived's configuration file:&lt;br /&gt;
 virtual_server ''service_address'' {&lt;br /&gt;
         ''...snip...''&lt;br /&gt;
         sorry_server 127.0.0.1 80&lt;br /&gt;
         ''...snip...''&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
TUX is a Linux kernel-project maintained by [http://www.redhat.com RedHat].&lt;br /&gt;
&lt;br /&gt;
This patch is maintained by Jacob Rief.&lt;br /&gt;
&lt;br /&gt;
[[Category:LVS Software]]&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=Talk:Main_Page&amp;diff=640</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=Talk:Main_Page&amp;diff=640"/>
				<updated>2006-04-22T22:07:10Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: add link to Net-SNMP-LVS-Module&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Write some discussions about Main Page here. Also, please write Main Page change request here, I protect Main Page because it has been spammed too often and Main Page is the entry point.&lt;br /&gt;
&lt;br /&gt;
== How to setup a Sorry-Server ==&lt;br /&gt;
Wensong, it would be nice to set a link onto [[SorryServer]] on the main page. I can well understand that you locked the main-page, since it has been spammed so often.&lt;br /&gt;
&lt;br /&gt;
:Galbum, thanks a lot for adding page [[SorryServer]], will add a link right now, thanks again.  --[[User:Wensong|Wensong]] 10:37, 22 Apr 2006 (CST)&lt;br /&gt;
&lt;br /&gt;
:Wensong, at the end of the page [http://www.linuxvirtualserver.org/software/index.html Software], there is a link onto a lvs-snmp module. It seems as if this module is not mantained any more, but I added an alternative to it: [[Net-SNMP-LVS-Module]]. This module is actively mantained and works with the newer versions of Net-SNMP. In order not to confuse the people, I would suggest to replace that link.&lt;br /&gt;
&lt;br /&gt;
== load balancing scheduling algorithm ==&lt;br /&gt;
&lt;br /&gt;
hello friends,&lt;br /&gt;
&lt;br /&gt;
     how to calculate  aggregated load value in load balancing algorthm.please help me.&lt;br /&gt;
&lt;br /&gt;
:Please take a look at the page [[Dynamic Feedback Load Balancing Scheduling]], maybe it can give some ideas. --[[User:Wensong|Wensong]] 18:15, 12 Mar 2006 (CST)&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=665</id>
		<title>SorryServer</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=665"/>
				<updated>2006-04-21T14:52:03Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* Using keepalived */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up a Sorry-Server ==&lt;br /&gt;
&lt;br /&gt;
Sometime all of your real-servers might be down or overloaded. This can be due to a mantainace interval,&lt;br /&gt;
hardware failure, badly written dynamic web-content, broken databases or script kiddies bringing your site down.&lt;br /&gt;
In such a situation it is much more polite to tell your customers that you are sorry but your site currently&lt;br /&gt;
is down, rather than just beeing not available.&lt;br /&gt;
&lt;br /&gt;
To set up such a webserver you normally would serve only some static content telling your customers that&lt;br /&gt;
you are sorry, but your web-services currently are not available. However the requests your customers send,&lt;br /&gt;
are regular URLs which are not resolvable by your Sorry-Server, and therefore would be answered with an&lt;br /&gt;
Error-Code: '''404 - Not Found'''. This Error-Code can be very annoying, if at the moment of the outage a&lt;br /&gt;
robot (such as Googlebot) is indexing your webpages. In such a situation most of your webpages&lt;br /&gt;
will fall out of the Google-index and your web-site might have to wait for up to a week to return back to&lt;br /&gt;
the Google-index, depending on the number visits of Googlebot per month.&lt;br /&gt;
&lt;br /&gt;
== Using TUX as Sorry-Server ==&lt;br /&gt;
[http://www.redhat.com/docs/manuals/tux/TUX-2.2-Manual/ TUX] is a tiny webserver which runs inside the Linux&lt;br /&gt;
kernel and is therefore predestined as a Sorry-Server. If your Loadbalancer is able to pass your web-traffic to&lt;br /&gt;
a number of real-servers, TUX running on the Loadbalancer is able to handle all that traffic by itself.&lt;br /&gt;
&lt;br /&gt;
The only precaution using TUX is not to send a Status '''200 - Ok''' neither an Error-Code '''404 - Not Found'''&lt;br /&gt;
as as Sorry-Page. The best fitting Error-Code to send in such a situation is '''502 - Server Overloaded'''.&lt;br /&gt;
&lt;br /&gt;
However this is not the default behaviour, nor can TUX be configured to do so. You must apply a tiny patch onto&lt;br /&gt;
the TUX-kernel-code, recompile that kernel-module and reinstall it onto your Loadbalancer.&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.4:&lt;br /&gt;
 diff -u kernel-2.4.21/linux-2.4.21/net/tux/proto_http.c linux-2.4.21-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.4.21/net/tux/proto_http.c     2005-03-07 15:09:45.000000000 +0100&lt;br /&gt;
 +++ linux-2.4.21-tux502/net/tux/proto_http.c    2005-03-07 15:08:13.000000000 +0100&lt;br /&gt;
 @@ -1172,7 +1172,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1838,7 +1838,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.6:&lt;br /&gt;
 diff -ur linux-2.6.9/net/tux/proto_http.c linux-2.6.9-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.6.9/net/tux/proto_http.c    2005-03-15 12:08:56.660827776 +0100&lt;br /&gt;
 +++ linux-2.6.9-tux502/net/tux/proto_http.c     2005-03-15 13:13:49.437035840 +0100&lt;br /&gt;
 @@ -1174,7 +1174,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1840,7 +1840,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
== Running the Sorry-Server ==&lt;br /&gt;
First start the TUX kernel-thread, by invoking &lt;br /&gt;
 /etc/init.d/tux start&lt;br /&gt;
The Sorry-Server can run all the time, even if you don't need it.&lt;br /&gt;
&lt;br /&gt;
In case all of your real-servers are down, you must reroute the traffic onto the Sorry-Server. First flush the Real-Server&lt;br /&gt;
Tables of your [[IPVS]] invoking &lt;br /&gt;
 ipvs -d -t ''service-address'' -r ''server-address''&lt;br /&gt;
for each of your real-servers. Next add a route the web-traffic onto the Sorry-Server, this normally is done by invoking &lt;br /&gt;
 ipvs -a -t ''service-address'' -r 127.0.0.1:80&lt;br /&gt;
once. All web-traffic now is redirected onto the Sorry-Server.&lt;br /&gt;
&lt;br /&gt;
Depending on where the TUX-configuration says to have its '''DOCUMENTROOT''', go to that directory and edit the file '''404.html''' adding some text such as ''Momentary system interruption''. You may also add stylesheet- and image-files to the Sorry-Server DOCUMENTROOT, you should however delete any '''index.html''' file since this would be served by default and with a HTTP-Status '''200 - OK'''. This is certainly not your intention.&lt;br /&gt;
&lt;br /&gt;
== Using keepalived ==&lt;br /&gt;
The [http://www.keepalived.org/ keepalived] is a program to check real-servers and manage the [[IPVS]]-Tables accordingly. Keepalived can be configured to automatically reroute all the web-traffic onto a Sorry-Server in case all real-servers are down. Simply add this line to each '''virtual_server''' section in the keepalived's configuration file:&lt;br /&gt;
 virtual_server ''service_address'' {&lt;br /&gt;
         ''...snip...''&lt;br /&gt;
         sorry_server 127.0.0.1 80&lt;br /&gt;
         ''...snip...''&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
TUX is a Linux kernel-project mantained by [http://www.redhat.com RedHat].&lt;br /&gt;
&lt;br /&gt;
This patch is maintained by Jacob Rief.&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=635</id>
		<title>SorryServer</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=635"/>
				<updated>2006-04-21T14:50:29Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* Using TUX as Sorry-Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up a Sorry-Server ==&lt;br /&gt;
&lt;br /&gt;
Sometime all of your real-servers might be down or overloaded. This can be due to a mantainace interval,&lt;br /&gt;
hardware failure, badly written dynamic web-content, broken databases or script kiddies bringing your site down.&lt;br /&gt;
In such a situation it is much more polite to tell your customers that you are sorry but your site currently&lt;br /&gt;
is down, rather than just beeing not available.&lt;br /&gt;
&lt;br /&gt;
To set up such a webserver you normally would serve only some static content telling your customers that&lt;br /&gt;
you are sorry, but your web-services currently are not available. However the requests your customers send,&lt;br /&gt;
are regular URLs which are not resolvable by your Sorry-Server, and therefore would be answered with an&lt;br /&gt;
Error-Code: '''404 - Not Found'''. This Error-Code can be very annoying, if at the moment of the outage a&lt;br /&gt;
robot (such as Googlebot) is indexing your webpages. In such a situation most of your webpages&lt;br /&gt;
will fall out of the Google-index and your web-site might have to wait for up to a week to return back to&lt;br /&gt;
the Google-index, depending on the number visits of Googlebot per month.&lt;br /&gt;
&lt;br /&gt;
== Using TUX as Sorry-Server ==&lt;br /&gt;
[http://www.redhat.com/docs/manuals/tux/TUX-2.2-Manual/ TUX] is a tiny webserver which runs inside the Linux&lt;br /&gt;
kernel and is therefore predestined as a Sorry-Server. If your Loadbalancer is able to pass your web-traffic to&lt;br /&gt;
a number of real-servers, TUX running on the Loadbalancer is able to handle all that traffic by itself.&lt;br /&gt;
&lt;br /&gt;
The only precaution using TUX is not to send a Status '''200 - Ok''' neither an Error-Code '''404 - Not Found'''&lt;br /&gt;
as as Sorry-Page. The best fitting Error-Code to send in such a situation is '''502 - Server Overloaded'''.&lt;br /&gt;
&lt;br /&gt;
However this is not the default behaviour, nor can TUX be configured to do so. You must apply a tiny patch onto&lt;br /&gt;
the TUX-kernel-code, recompile that kernel-module and reinstall it onto your Loadbalancer.&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.4:&lt;br /&gt;
 diff -u kernel-2.4.21/linux-2.4.21/net/tux/proto_http.c linux-2.4.21-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.4.21/net/tux/proto_http.c     2005-03-07 15:09:45.000000000 +0100&lt;br /&gt;
 +++ linux-2.4.21-tux502/net/tux/proto_http.c    2005-03-07 15:08:13.000000000 +0100&lt;br /&gt;
 @@ -1172,7 +1172,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1838,7 +1838,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.6:&lt;br /&gt;
 diff -ur linux-2.6.9/net/tux/proto_http.c linux-2.6.9-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.6.9/net/tux/proto_http.c    2005-03-15 12:08:56.660827776 +0100&lt;br /&gt;
 +++ linux-2.6.9-tux502/net/tux/proto_http.c     2005-03-15 13:13:49.437035840 +0100&lt;br /&gt;
 @@ -1174,7 +1174,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1840,7 +1840,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
== Running the Sorry-Server ==&lt;br /&gt;
First start the TUX kernel-thread, by invoking &lt;br /&gt;
 /etc/init.d/tux start&lt;br /&gt;
The Sorry-Server can run all the time, even if you don't need it.&lt;br /&gt;
&lt;br /&gt;
In case all of your real-servers are down, you must reroute the traffic onto the Sorry-Server. First flush the Real-Server&lt;br /&gt;
Tables of your [[IPVS]] invoking &lt;br /&gt;
 ipvs -d -t ''service-address'' -r ''server-address''&lt;br /&gt;
for each of your real-servers. Next add a route the web-traffic onto the Sorry-Server, this normally is done by invoking &lt;br /&gt;
 ipvs -a -t ''service-address'' -r 127.0.0.1:80&lt;br /&gt;
once. All web-traffic now is redirected onto the Sorry-Server.&lt;br /&gt;
&lt;br /&gt;
Depending on where the TUX-configuration says to have its '''DOCUMENTROOT''', go to that directory and edit the file '''404.html''' adding some text such as ''Momentary system interruption''. You may also add stylesheet- and image-files to the Sorry-Server DOCUMENTROOT, you should however delete any '''index.html''' file since this would be served by default and with a HTTP-Status '''200 - OK'''. This is certainly not your intention.&lt;br /&gt;
&lt;br /&gt;
== Using keepalived ==&lt;br /&gt;
The [[http://www.keepalived.org/ keepalived]] is a program to check real-servers and manage the [[IPVS]]-Tables accordingly. Keepalived can be configured to automatically reroute all the web-traffic onto a Sorry-Server in case all real-servers are down. Simply add this line to each '''virtual_server''' section in the keepalived's configuration file:&lt;br /&gt;
         sorry_server 127.0.0.1 80&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
TUX is a Linux kernel-project mantained by [http://www.redhat.com RedHat].&lt;br /&gt;
&lt;br /&gt;
This patch is maintained by Jacob Rief.&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=634</id>
		<title>SorryServer</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=634"/>
				<updated>2006-04-21T14:50:07Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* Using TUX as Sorry-Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up a Sorry-Server ==&lt;br /&gt;
&lt;br /&gt;
Sometime all of your real-servers might be down or overloaded. This can be due to a mantainace interval,&lt;br /&gt;
hardware failure, badly written dynamic web-content, broken databases or script kiddies bringing your site down.&lt;br /&gt;
In such a situation it is much more polite to tell your customers that you are sorry but your site currently&lt;br /&gt;
is down, rather than just beeing not available.&lt;br /&gt;
&lt;br /&gt;
To set up such a webserver you normally would serve only some static content telling your customers that&lt;br /&gt;
you are sorry, but your web-services currently are not available. However the requests your customers send,&lt;br /&gt;
are regular URLs which are not resolvable by your Sorry-Server, and therefore would be answered with an&lt;br /&gt;
Error-Code: '''404 - Not Found'''. This Error-Code can be very annoying, if at the moment of the outage a&lt;br /&gt;
robot (such as Googlebot) is indexing your webpages. In such a situation most of your webpages&lt;br /&gt;
will fall out of the Google-index and your web-site might have to wait for up to a week to return back to&lt;br /&gt;
the Google-index, depending on the number visits of Googlebot per month.&lt;br /&gt;
&lt;br /&gt;
== Using TUX as Sorry-Server ==&lt;br /&gt;
[http://www.redhat.com/docs/manuals/tux/TUX-2.2-Manual/ TUX] is a tiny webserver which runs inside the Linux&lt;br /&gt;
kernel and is therefore predestined as a Sorry-Server. If your Loadbalancer is able to pass your web-traffic to&lt;br /&gt;
a number of real-servers, TUX running on the Loadbalancer is able to handle all that traffic by itself.&lt;br /&gt;
&lt;br /&gt;
The only precaution using [TUX] is not to send a Status '''200 - Ok''' neither an Error-Code '''404 - Not Found'''&lt;br /&gt;
as as Sorry-Page. The best fitting Error-Code to send in such a situation is '''502 - Server Overloaded'''.&lt;br /&gt;
&lt;br /&gt;
However this is not the default behaviour, nor can TUX be configured to do so. You must apply a tiny patch onto&lt;br /&gt;
the TUX-kernel-code, recompile that kernel-module and reinstall it onto your Loadbalancer.&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.4:&lt;br /&gt;
 diff -u kernel-2.4.21/linux-2.4.21/net/tux/proto_http.c linux-2.4.21-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.4.21/net/tux/proto_http.c     2005-03-07 15:09:45.000000000 +0100&lt;br /&gt;
 +++ linux-2.4.21-tux502/net/tux/proto_http.c    2005-03-07 15:08:13.000000000 +0100&lt;br /&gt;
 @@ -1172,7 +1172,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1838,7 +1838,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.6:&lt;br /&gt;
 diff -ur linux-2.6.9/net/tux/proto_http.c linux-2.6.9-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.6.9/net/tux/proto_http.c    2005-03-15 12:08:56.660827776 +0100&lt;br /&gt;
 +++ linux-2.6.9-tux502/net/tux/proto_http.c     2005-03-15 13:13:49.437035840 +0100&lt;br /&gt;
 @@ -1174,7 +1174,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1840,7 +1840,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
== Running the Sorry-Server ==&lt;br /&gt;
First start the TUX kernel-thread, by invoking &lt;br /&gt;
 /etc/init.d/tux start&lt;br /&gt;
The Sorry-Server can run all the time, even if you don't need it.&lt;br /&gt;
&lt;br /&gt;
In case all of your real-servers are down, you must reroute the traffic onto the Sorry-Server. First flush the Real-Server&lt;br /&gt;
Tables of your [[IPVS]] invoking &lt;br /&gt;
 ipvs -d -t ''service-address'' -r ''server-address''&lt;br /&gt;
for each of your real-servers. Next add a route the web-traffic onto the Sorry-Server, this normally is done by invoking &lt;br /&gt;
 ipvs -a -t ''service-address'' -r 127.0.0.1:80&lt;br /&gt;
once. All web-traffic now is redirected onto the Sorry-Server.&lt;br /&gt;
&lt;br /&gt;
Depending on where the TUX-configuration says to have its '''DOCUMENTROOT''', go to that directory and edit the file '''404.html''' adding some text such as ''Momentary system interruption''. You may also add stylesheet- and image-files to the Sorry-Server DOCUMENTROOT, you should however delete any '''index.html''' file since this would be served by default and with a HTTP-Status '''200 - OK'''. This is certainly not your intention.&lt;br /&gt;
&lt;br /&gt;
== Using keepalived ==&lt;br /&gt;
The [[http://www.keepalived.org/ keepalived]] is a program to check real-servers and manage the [[IPVS]]-Tables accordingly. Keepalived can be configured to automatically reroute all the web-traffic onto a Sorry-Server in case all real-servers are down. Simply add this line to each '''virtual_server''' section in the keepalived's configuration file:&lt;br /&gt;
         sorry_server 127.0.0.1 80&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
TUX is a Linux kernel-project mantained by [http://www.redhat.com RedHat].&lt;br /&gt;
&lt;br /&gt;
This patch is maintained by Jacob Rief.&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=Talk:Main_Page&amp;diff=636</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=Talk:Main_Page&amp;diff=636"/>
				<updated>2006-04-21T14:46:21Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Write some discussions about Main Page here.&lt;br /&gt;
&lt;br /&gt;
== How to setup a Sorry-Server ==&lt;br /&gt;
Wensong, it would be nice to set a link onto [[SorryServer]] on the main page. I can well understand that you locked the main-page, since it has been spammed so often.&lt;br /&gt;
&lt;br /&gt;
== load balancing scheduling algorithm ==&lt;br /&gt;
&lt;br /&gt;
hello friends,&lt;br /&gt;
&lt;br /&gt;
     how to calculate  aggregated load value in load balancing algorthm.please help me.&lt;br /&gt;
&lt;br /&gt;
:Please take a look at the page [[Dynamic Feedback Load Balancing Scheduling]], maybe it can give some ideas. --[[User:Wensong|Wensong]] 18:15, 12 Mar 2006 (CST)&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=633</id>
		<title>SorryServer</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=633"/>
				<updated>2006-04-21T14:37:32Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* Using keepalied */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up a Sorry-Server ==&lt;br /&gt;
&lt;br /&gt;
Sometime all of your real-servers might be down or overloaded. This can be due to a mantainace interval,&lt;br /&gt;
hardware failure, badly written dynamic web-content, broken databases or script kiddies bringing your site down.&lt;br /&gt;
In such a situation it is much more polite to tell your customers that you are sorry but your site currently&lt;br /&gt;
is down, rather than just beeing not available.&lt;br /&gt;
&lt;br /&gt;
To set up such a webserver you normally would serve only some static content telling your customers that&lt;br /&gt;
you are sorry, but your web-services currently are not available. However the requests your customers send,&lt;br /&gt;
are regular URLs which are not resolvable by your Sorry-Server, and therefore would be answered with an&lt;br /&gt;
Error-Code: '''404 - Not Found'''. This Error-Code can be very annoying, if at the moment of the outage a&lt;br /&gt;
robot (such as Googlebot) is indexing your webpages. In such a situation most of your webpages&lt;br /&gt;
will fall out of the Google-index and your web-site might have to wait for up to a week to return back to&lt;br /&gt;
the Google-index, depending on the number visits of Googlebot per month.&lt;br /&gt;
&lt;br /&gt;
== Using TUX as Sorry-Server ==&lt;br /&gt;
[[http://www.redhat.com/docs/manuals/tux/TUX-2.2-Manual/ TUX]] is a tiny webserver which runs inside the Linux&lt;br /&gt;
kernel and is therefore predestined as a Sorry-Server. If your Loadbalancer is able to pass your web-traffic to&lt;br /&gt;
a number of real-servers, TUX running on the Loadbalancer is able to handle all that traffic by itself.&lt;br /&gt;
&lt;br /&gt;
The only precaution using TUX is not to send a Status '''200 - Ok''' neither an Error-Code '''404 - Not Found'''&lt;br /&gt;
as as Sorry-Page. The best fitting Error-Code to send in such a situation is '''502 - Server Overloaded'''.&lt;br /&gt;
&lt;br /&gt;
However this is not the default behaviour, nor can TUX be configured to do so. You must apply a tiny patch onto&lt;br /&gt;
the TUX-kernel-code, recompile that kernel-module and reinstall it onto your Loadbalancer.&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.4:&lt;br /&gt;
 diff -u kernel-2.4.21/linux-2.4.21/net/tux/proto_http.c linux-2.4.21-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.4.21/net/tux/proto_http.c     2005-03-07 15:09:45.000000000 +0100&lt;br /&gt;
 +++ linux-2.4.21-tux502/net/tux/proto_http.c    2005-03-07 15:08:13.000000000 +0100&lt;br /&gt;
 @@ -1172,7 +1172,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1838,7 +1838,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.6:&lt;br /&gt;
 diff -ur linux-2.6.9/net/tux/proto_http.c linux-2.6.9-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.6.9/net/tux/proto_http.c    2005-03-15 12:08:56.660827776 +0100&lt;br /&gt;
 +++ linux-2.6.9-tux502/net/tux/proto_http.c     2005-03-15 13:13:49.437035840 +0100&lt;br /&gt;
 @@ -1174,7 +1174,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1840,7 +1840,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
== Running the Sorry-Server ==&lt;br /&gt;
First start the TUX kernel-thread, by invoking &lt;br /&gt;
 /etc/init.d/tux start&lt;br /&gt;
The Sorry-Server can run all the time, even if you don't need it.&lt;br /&gt;
&lt;br /&gt;
In case all of your real-servers are down, you must reroute the traffic onto the Sorry-Server. First flush the Real-Server&lt;br /&gt;
Tables of your [[IPVS]] invoking &lt;br /&gt;
 ipvs -d -t ''service-address'' -r ''server-address''&lt;br /&gt;
for each of your real-servers. Next add a route the web-traffic onto the Sorry-Server, this normally is done by invoking &lt;br /&gt;
 ipvs -a -t ''service-address'' -r 127.0.0.1:80&lt;br /&gt;
once. All web-traffic now is redirected onto the Sorry-Server.&lt;br /&gt;
&lt;br /&gt;
Depending on where the TUX-configuration says to have its '''DOCUMENTROOT''', go to that directory and edit the file '''404.html''' adding some text such as ''Momentary system interruption''. You may also add stylesheet- and image-files to the Sorry-Server DOCUMENTROOT, you should however delete any '''index.html''' file since this would be served by default and with a HTTP-Status '''200 - OK'''. This is certainly not your intention.&lt;br /&gt;
&lt;br /&gt;
== Using keepalived ==&lt;br /&gt;
The [[http://www.keepalived.org/ keepalived]] is a program to check real-servers and manage the [[IPVS]]-Tables accordingly. Keepalived can be configured to automatically reroute all the web-traffic onto a Sorry-Server in case all real-servers are down. Simply add this line to each '''virtual_server''' section in the keepalived's configuration file:&lt;br /&gt;
         sorry_server 127.0.0.1 80&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
TUX is a Linux kernel-project mantained by [http://www.redhat.com RedHat].&lt;br /&gt;
&lt;br /&gt;
This patch is maintained by Jacob Rief.&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=631</id>
		<title>SorryServer</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=SorryServer&amp;diff=631"/>
				<updated>2006-04-21T14:36:10Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up a Sorry-Server ==&lt;br /&gt;
&lt;br /&gt;
Sometime all of your real-servers might be down or overloaded. This can be due to a mantainace interval,&lt;br /&gt;
hardware failure, badly written dynamic web-content, broken databases or script kiddies bringing your site down.&lt;br /&gt;
In such a situation it is much more polite to tell your customers that you are sorry but your site currently&lt;br /&gt;
is down, rather than just beeing not available.&lt;br /&gt;
&lt;br /&gt;
To set up such a webserver you normally would serve only some static content telling your customers that&lt;br /&gt;
you are sorry, but your web-services currently are not available. However the requests your customers send,&lt;br /&gt;
are regular URLs which are not resolvable by your Sorry-Server, and therefore would be answered with an&lt;br /&gt;
Error-Code: '''404 - Not Found'''. This Error-Code can be very annoying, if at the moment of the outage a&lt;br /&gt;
robot (such as Googlebot) is indexing your webpages. In such a situation most of your webpages&lt;br /&gt;
will fall out of the Google-index and your web-site might have to wait for up to a week to return back to&lt;br /&gt;
the Google-index, depending on the number visits of Googlebot per month.&lt;br /&gt;
&lt;br /&gt;
== Using TUX as Sorry-Server ==&lt;br /&gt;
[[http://www.redhat.com/docs/manuals/tux/TUX-2.2-Manual/ TUX]] is a tiny webserver which runs inside the Linux&lt;br /&gt;
kernel and is therefore predestined as a Sorry-Server. If your Loadbalancer is able to pass your web-traffic to&lt;br /&gt;
a number of real-servers, TUX running on the Loadbalancer is able to handle all that traffic by itself.&lt;br /&gt;
&lt;br /&gt;
The only precaution using TUX is not to send a Status '''200 - Ok''' neither an Error-Code '''404 - Not Found'''&lt;br /&gt;
as as Sorry-Page. The best fitting Error-Code to send in such a situation is '''502 - Server Overloaded'''.&lt;br /&gt;
&lt;br /&gt;
However this is not the default behaviour, nor can TUX be configured to do so. You must apply a tiny patch onto&lt;br /&gt;
the TUX-kernel-code, recompile that kernel-module and reinstall it onto your Loadbalancer.&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.4:&lt;br /&gt;
 diff -u kernel-2.4.21/linux-2.4.21/net/tux/proto_http.c linux-2.4.21-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.4.21/net/tux/proto_http.c     2005-03-07 15:09:45.000000000 +0100&lt;br /&gt;
 +++ linux-2.4.21-tux502/net/tux/proto_http.c    2005-03-07 15:08:13.000000000 +0100&lt;br /&gt;
 @@ -1172,7 +1172,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1838,7 +1838,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
Patch for Linux-kernel-2.6:&lt;br /&gt;
 diff -ur linux-2.6.9/net/tux/proto_http.c linux-2.6.9-tux502/net/tux/proto_http.c&lt;br /&gt;
 --- linux-2.6.9/net/tux/proto_http.c    2005-03-15 12:08:56.660827776 +0100&lt;br /&gt;
 +++ linux-2.6.9-tux502/net/tux/proto_http.c     2005-03-15 13:13:49.437035840 +0100&lt;br /&gt;
 @@ -1174,7 +1174,7 @@&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Forbidden &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  static const char not_found[] =&lt;br /&gt;
 -       &amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;br /&gt;
 +       &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;Connection: Keep-Alive\r\n&amp;quot; \&lt;br /&gt;
         &amp;quot;Content-Length: 29\r\n\r\n&amp;quot;&lt;br /&gt;
         &amp;quot;&amp;lt;HTML&amp;gt; Page Not Found &amp;lt;/HTML&amp;gt;&amp;quot;;&lt;br /&gt;
 @@ -1840,7 +1840,7 @@&lt;br /&gt;
                 &amp;quot;HTTP/1.1 206 Partial Content&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1C \&lt;br /&gt;
 -               &amp;quot;HTTP/1.1 404 Page Not Found\r\n&amp;quot; \&lt;br /&gt;
 +               &amp;quot;HTTP/1.1 502 Service temporarily down\r\n&amp;quot; \&lt;br /&gt;
                 &amp;quot;Content-Type: &amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  #define HEADER_PART1D \&lt;br /&gt;
&lt;br /&gt;
== Running the Sorry-Server ==&lt;br /&gt;
First start the TUX kernel-thread, by invoking &lt;br /&gt;
 /etc/init.d/tux start&lt;br /&gt;
The Sorry-Server can run all the time, even if you don't need it.&lt;br /&gt;
&lt;br /&gt;
In case all of your real-servers are down, you must reroute the traffic onto the Sorry-Server. First flush the Real-Server&lt;br /&gt;
Tables of your [[IPVS]] invoking &lt;br /&gt;
 ipvs -d -t ''service-address'' -r ''server-address''&lt;br /&gt;
for each of your real-servers. Next add a route the web-traffic onto the Sorry-Server, this normally is done by invoking &lt;br /&gt;
 ipvs -a -t ''service-address'' -r 127.0.0.1:80&lt;br /&gt;
once. All web-traffic now is redirected onto the Sorry-Server.&lt;br /&gt;
&lt;br /&gt;
Depending on where the TUX-configuration says to have its '''DOCUMENTROOT''', go to that directory and edit the file '''404.html''' adding some text such as ''Momentary system interruption''. You may also add stylesheet- and image-files to the Sorry-Server DOCUMENTROOT, you should however delete any '''index.html''' file since this would be served by default and with a HTTP-Status '''200 - OK'''. This is certainly not your intention.&lt;br /&gt;
&lt;br /&gt;
== Using keepalied ==&lt;br /&gt;
The [[http://www.keepalived.org/ keepalied]] is a program to check real-servers and manage the [[IPVS]]-Tables accordingly. Keepalived can be configured to automatically reroute all the web-traffic onto the Sorry-Server. Simply add this line to each '''virtual_server''' block in the keepalived's configuration file:&lt;br /&gt;
         sorry_server 127.0.0.1 80&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
TUX is a Linux kernel-project mantained by [http://www.redhat.com RedHat].&lt;br /&gt;
&lt;br /&gt;
This patch is maintained by Jacob Rief.&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=FAQ&amp;diff=690</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=FAQ&amp;diff=690"/>
				<updated>2006-04-21T13:15:31Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: /* How do i get counters from ipvsadm in order to create graphs from? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
=== What's LVS? ===&lt;br /&gt;
&lt;br /&gt;
LVS stands for Linux Virtual Server, which is a highly scalable and highly available server built on a cluster of real servers, with the [[load balancer]] running on the Linux operating system. Users interact as if it were a single virtual server.&lt;br /&gt;
&lt;br /&gt;
=== Is LVS software free? ===&lt;br /&gt;
&lt;br /&gt;
Yes! All LVS software is released under the [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)].&lt;br /&gt;
&lt;br /&gt;
=== Is there a FreeBSD port of LVS software? ===&lt;br /&gt;
&lt;br /&gt;
Yes, there is a FreeBSD port of IPVS, which supports the [[LVS/DR]] and [[LVS/TUN]] methods now. See [http://dragon.linux-vs.org/~dragonfly/htm/lvs_freebsd.htm the LVS On FreeBSD page] for more information.&lt;br /&gt;
&lt;br /&gt;
=== Does LVS cluster support Linux servers only? ===&lt;br /&gt;
&lt;br /&gt;
No, real servers can almost run any operating systems in a LVS cluster, such as Linux, BSDs, Solaris, and Windows. [[LVS/NAT]] balance servers of the operating systems having TCP/IP support, [[LVS/TUN]] requires servers having IP Tunneling protocol, and [[LVS/DR]] requires servers having a non-arp device. Almost all the modern operating systems support non-arp device.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
=== How is the concurrent processing performance of current LVS software? ===&lt;br /&gt;
&lt;br /&gt;
The ultimate performance of LVS depends on hardware that LVS runs on. An ordinary box with a single Pentium III processor and 100Mbps NIC card running [[LVS/DR]] can handle about 10,000 connections per second for web service. We have heard that a powerful box with good hardware and kernel tuning achieved 50,000 connections per second.&lt;br /&gt;
&lt;br /&gt;
=== Can LVS handle more than 1 million simultaneous connections? ===&lt;br /&gt;
&lt;br /&gt;
Yes, LVS can handle much more than 1 million simultaneous connections. One connection just costs 128 bytes in the LVS box, so an LVS box with 1G memory can handle more than 8 million simultaneous connections.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
=== How do I check to see if my kernel has IPVS enabled? ===&lt;br /&gt;
&lt;br /&gt;
Try to run &amp;quot;modprobe ip_vs&amp;quot; and try to see if there is /proc/net/ip_vs. If so, your kernel has [[IPVS]] enabled. You can also run &amp;quot;cat /proc/net/ip_vs&amp;quot; or &amp;quot;ipvsadm -Ln&amp;quot; to see the version number of [[IPVS]].&lt;br /&gt;
&lt;br /&gt;
== Statistics ==&lt;br /&gt;
&lt;br /&gt;
=== How do i get counters from ipvsadm in order to create graphs from? ===&lt;br /&gt;
&lt;br /&gt;
'''Answer 1:'''&lt;br /&gt;
&lt;br /&gt;
The current kernel 2.6 version of ipvsadm (v1.24) supports&lt;br /&gt;
 ipvsadm --list --stats --numeric --exact&lt;br /&gt;
which gives you non-human-readable counters for Connections, Packets and Bytes for each Service Address and Realserver.&lt;br /&gt;
&lt;br /&gt;
'''Answer 2:'''&lt;br /&gt;
&lt;br /&gt;
Install [http://oss.oetiker.ch/rrdtool/ RRDtool] and preferabely [http://www.cacti.net/ Cacti] onto a host of your choice. From your favorite Linux distribution, install the [http://www.net-snmp.org/ Net-SNMP daemon] onto the Loadbalancer host. Apply the [[Net-SNMP-LVS-Module]] to the Net-SNMP daemon. Using RRDtool and/or cacti you may query the Loadbalancer and create all kind of graphs using the statistics the Loadbalancers IPVS-module delivers.&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	<entry>
		<id>https://kb.linuxvirtualserver.org/wiki?title=Net-SNMP-LVS-Module&amp;diff=639</id>
		<title>Net-SNMP-LVS-Module</title>
		<link rel="alternate" type="text/html" href="https://kb.linuxvirtualserver.org/wiki?title=Net-SNMP-LVS-Module&amp;diff=639"/>
				<updated>2006-03-02T10:23:27Z</updated>
		
		<summary type="html">&lt;p&gt;Galbum: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== GENERAL ==&lt;br /&gt;
net-snmpd-lvs-module is a dynamicaly loadable shared object to get the configuration and some statistical information from the Linux kernel with IP virtual server support.&lt;br /&gt;
&lt;br /&gt;
== INSTALLATION ==&lt;br /&gt;
Get the [http://homes.tiscover.com/jrief/net-snmp-lvs-module/net-snmp-lvs-module-0.0.4.tar.gz source] for this module. From http://www.linuxvirtualserver.org/software/ipvs.html download the the correct version of ipvsadm, for kernel 2.6 use ipvsadm-1.24 or later, for kernel 2.4 use ipvsadm-1.21. Extract '''ipvsadm-''version''.tar.gz''', build the library and copy the subtree '''libipvs''' into the module's working directory.&lt;br /&gt;
&lt;br /&gt;
Check that the Linux kernel is available under '''/usr/src/linux'''. Install net-snmp and its development headers and libraries. Invoke '''make''', this should build '''lvs.so'''. Copy LVS-MIB.txt and OC.txt to '''/usr/share/snmp/mibs/'''.&lt;br /&gt;
&lt;br /&gt;
Check that the new MIB is visible by invoking&lt;br /&gt;
 shell&amp;gt; snmptranslate -m LVS-MIB -On -IR lvsServiceEntry,&lt;br /&gt;
this should return '''.1.3.6.1.4.1.8225.4711.18.1'''&lt;br /&gt;
Copy '''lvs.so''' to '''/usr/lib/libnetsnmplvs.so''' and add the following line to&lt;br /&gt;
'''/etc/snmp/snmpd.conf''':&lt;br /&gt;
 dlmod lvs /usr/lib/libnetsnmplvs.so&lt;br /&gt;
Restart your snmpd.&lt;br /&gt;
&lt;br /&gt;
Try if everything works invoking:&lt;br /&gt;
 shell&amp;gt; snmpwalk -c public -v 2c -m LVS-MIB localhost 1.3.6.1.4.1.8225.4711&lt;br /&gt;
 LVS-MIB::lvsVersion.0 = STRING: &amp;quot;1.2.0&amp;quot;&lt;br /&gt;
 LVS-MIB::lvsNumServices.0 = INTEGER: 2&lt;br /&gt;
 LVS-MIB::lvsHashTableSize.0 = INTEGER: 4096&lt;br /&gt;
 LVS-MIB::lvsTcpTimeOut.0 = INTEGER: 900&lt;br /&gt;
 LVS-MIB::lvsTcpFinTimeOut.0 = INTEGER: 120&lt;br /&gt;
 LVS-MIB::lvsUdpTimeOut.0 = INTEGER: 300&lt;br /&gt;
 LVS-MIB::lvsDaemonState.0 = INTEGER: none(0)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
In case you want to add additional snmp-values to your MIB:&lt;br /&gt;
Set export MIBS=ALL and create skeleton with&lt;br /&gt;
 shell&amp;gt; mib2c -c mib2c.interate.conf lvsRealTable&lt;br /&gt;
or&lt;br /&gt;
 shell&amp;gt; mib2c -c mib2c.interate.conf lvsServiceTable&lt;br /&gt;
this should create a file '''lvsRealTable.c''' and/or '''lvsServiceTable.c'''.&lt;br /&gt;
Use the generated code as a template for '''lvs.c''' and populate the missing parts.&lt;br /&gt;
&lt;br /&gt;
== CREDITS ==&lt;br /&gt;
The code for this module currently is maintained by Jacob Rief. This code is based on ucd-snmpd-lvs written by Romeo Benzoni in 2002 and never modified since. As that code did not compile with the newer net-snmp headers, I decided to rewrite the complete code. The only unchanged parts from the ucd-snmpd-lvs project are LVS-MIB.txt and OC.txt.&lt;br /&gt;
&lt;br /&gt;
== Extrenal Links ==&lt;br /&gt;
Official site: http://homes.tiscover.com/jrief/net-snmp-lvs-module/&lt;/div&gt;</summary>
		<author><name>Galbum</name></author>	</entry>

	</feed>