httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1726238 - /httpd/httpd/trunk/docs/manual/mod/mod_proxy_hcheck.xml
Date Fri, 22 Jan 2016 15:42:43 GMT
Author: jim
Date: Fri Jan 22 15:42:42 2016
New Revision: 1726238

Add examples


Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy_hcheck.xml
--- httpd/httpd/trunk/docs/manual/mod/mod_proxy_hcheck.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_proxy_hcheck.xml Fri Jan 22 15:42:42 2016
@@ -90,6 +90,41 @@
+<section id="examples">
+	<title>Usage examples</title>
+    <p>The following example shows how one might configured health checking
+    	for various backend servers:</p>
+	<!-- This section should probably be extended with more, useful examples -->
+	<highlight language="config">
+ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/}
+ProxyHCExpr gdown %{REQUEST_STATUS} =~ /^[5]/}
+ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/}
+&lt;Proxy balancer://foo&gt;
+  BalancerMember  hcmethod=GET hcexpr=in_maint hcuri=/status.php
+  BalancerMember  hcmethod=HEAD hcexpr=ok234 hcinterval=10
+  BalancerMember hcmethod=TCP hcinterval=5
+  BalancerMember
+ProxyPass "/" "balancer://foo"
+ProxyPassReverse "/" "balancer://foo"
+<p>In this scenario, <code></code> is health checked
by sending a <code>GET /status.php</code>
+request to that server and seeing that the returned page does not include the string <em>Under
maintenance</em>. If
+it does, that server is put in health-check fail mode, and disabled. This dynamic check is
+every 30 seconds, which is the default.</p>
+<p><code></code> is checked by sending a simple
<code>HEAD</code> request every
+10 seconds and making sure that the response status is 2xx, 3xx or 4xx. <code></code>
is checked
+every 5 seconds by simply ensuring that the socket to that server is up and <code></code>
+not dynamically checked at all.</p>
 <description>Creates a named condition expression to use to determine health of the
backend based on its response.</description>

View raw message