|
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8" /> |
5 | | - <title>HAProxy version 2.8.15 - Configuration Manual</title> |
| 5 | + <title>HAProxy version 2.8.15-33 - Configuration Manual</title> |
6 | 6 | <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> |
7 | 7 | <link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" /> |
8 | 8 | <link href="../css/page.css?0.4.2-15" rel="stylesheet" /> |
|
4294 | 4294 | You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br> |
4295 | 4295 | </p> |
4296 | 4296 | <p class="text-right"> |
4297 | | - <small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2025/04/22</b></small> |
| 4297 | + <small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2025/05/27</b></small> |
4298 | 4298 | </p> |
4299 | 4299 | </div> |
4300 | 4300 | <!-- /.sidebar --> |
|
4305 | 4305 | <div class="text-center"> |
4306 | 4306 | <h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1> |
4307 | 4307 | <h2>Configuration Manual</h2> |
4308 | | - <p><strong>version 2.8.15</strong></p> |
| 4308 | + <p><strong>version 2.8.15-33</strong></p> |
4309 | 4309 | <p> |
4310 | 4310 | 2025/04/22<br> |
4311 | 4311 |
|
@@ -9176,7 +9176,7 @@ <h2 id="chapter-3.9" data-target="3.9"><small><a class="small" href="#3.9">3.9.< |
9176 | 9176 |
|
9177 | 9177 | ring myring |
9178 | 9178 | description "My local buffer" |
9179 | | - format rfc3164 |
| 9179 | + format rfc5424 |
9180 | 9180 | maxlen 1200 |
9181 | 9181 | size 32764 |
9182 | 9182 | timeout connect 5s |
@@ -20174,15 +20174,20 @@ <h2 id="chapter-5.2" data-target="5.2"><small><a class="small" href="#5.2">5.2.< |
20174 | 20174 | instances on the fly. This option defaults to "last,libc" indicating that the |
20175 | 20175 | previous address found in the state file (if any) is used first, otherwise |
20176 | 20176 | the libc's resolver is used. This ensures continued compatibility with the |
20177 | | -historic behavior. |
20178 | | -</pre><div class="separator"> |
20179 | | -<span class="label label-success">Example:</span> |
20180 | | -<pre class="prettyprint"> |
20181 | | -<code>defaults |
20182 | | - <span class="comment"># never fail on address resolution</span> |
20183 | | - default-server init-addr last,libc,none |
20184 | | -</code></pre> |
20185 | | -</div><a class="anchor" name="inter"></a><a class="anchor" name="5-inter"></a><a class="anchor" name="5.2-inter"></a><a class="anchor" name="inter (Bind and server options)"></a><a class="anchor" name="inter (Server and default-server options)"></a><div class="keyword"><b><a class="anchor" name="inter"></a><a href="#5.2-inter">inter</a></b> <span style="color: #080"><delay></span></div><a class="anchor" name="fastinter"></a><a class="anchor" name="5-fastinter"></a><a class="anchor" name="5.2-fastinter"></a><a class="anchor" name="fastinter (Bind and server options)"></a><a class="anchor" name="fastinter (Server and default-server options)"></a><div class="keyword"><b><a class="anchor" name="fastinter"></a><a href="#5.2-fastinter">fastinter</a></b> <span style="color: #080"><delay></span></div><a class="anchor" name="downinter"></a><a class="anchor" name="5-downinter"></a><a class="anchor" name="5.2-downinter"></a><a class="anchor" name="downinter (Bind and server options)"></a><a class="anchor" name="downinter (Server and default-server options)"></a><div class="keyword"><b><a class="anchor" name="downinter"></a><a href="#5.2-downinter">downinter</a></b> <span style="color: #080"><delay></span></div><pre class="text">The "<a href="#inter">inter</a>" parameter sets the interval between two consecutive health checks |
| 20177 | +historic behavior. When using internal resolvers, it is generally recommended |
| 20178 | +to either disable libc-based resolution, or make it explicit (see <a href="#5.3">section 5.3</a> |
| 20179 | +for more details). |
| 20180 | + |
| 20181 | +Example 1: |
| 20182 | + defaults |
| 20183 | + # never fail on address resolution |
| 20184 | + default-server init-addr last,libc,none |
| 20185 | + |
| 20186 | +Example 2: |
| 20187 | + defaults |
| 20188 | + # disable libc resolution in combination with resolvers |
| 20189 | + default-server init-addr last,none |
| 20190 | +</pre><a class="anchor" name="inter"></a><a class="anchor" name="5-inter"></a><a class="anchor" name="5.2-inter"></a><a class="anchor" name="inter (Bind and server options)"></a><a class="anchor" name="inter (Server and default-server options)"></a><div class="keyword"><b><a class="anchor" name="inter"></a><a href="#5.2-inter">inter</a></b> <span style="color: #080"><delay></span></div><a class="anchor" name="fastinter"></a><a class="anchor" name="5-fastinter"></a><a class="anchor" name="5.2-fastinter"></a><a class="anchor" name="fastinter (Bind and server options)"></a><a class="anchor" name="fastinter (Server and default-server options)"></a><div class="keyword"><b><a class="anchor" name="fastinter"></a><a href="#5.2-fastinter">fastinter</a></b> <span style="color: #080"><delay></span></div><a class="anchor" name="downinter"></a><a class="anchor" name="5-downinter"></a><a class="anchor" name="5.2-downinter"></a><a class="anchor" name="downinter (Bind and server options)"></a><a class="anchor" name="downinter (Server and default-server options)"></a><div class="keyword"><b><a class="anchor" name="downinter"></a><a href="#5.2-downinter">downinter</a></b> <span style="color: #080"><delay></span></div><pre class="text">The "<a href="#inter">inter</a>" parameter sets the interval between two consecutive health checks |
20186 | 20191 | to <delay> milliseconds. If left unspecified, the delay defaults to 2000 ms. |
20187 | 20192 | It is also possible to use "<a href="#fastinter">fastinter</a>" and "<a href="#downinter">downinter</a>" to optimize delays |
20188 | 20193 | between checks depending on the server state : |
@@ -20543,13 +20548,16 @@ <h2 id="chapter-5.2" data-target="5.2"><small><a class="small" href="#5.2">5.2.< |
20543 | 20548 | <code>server s1 app1.domain.com:80 resolvers mydns resolve-net 10.0.0.0/8 |
20544 | 20549 | </code></pre> |
20545 | 20550 | </div><a class="anchor" name="resolvers"></a><a class="anchor" name="5-resolvers"></a><a class="anchor" name="5.2-resolvers"></a><a class="anchor" name="resolvers (Bind and server options)"></a><a class="anchor" name="resolvers (Server and default-server options)"></a><div class="keyword"><b><a class="anchor" name="resolvers"></a><a href="#5.2-resolvers">resolvers</a></b> <span style="color: #080"><id></span></div><pre class="text">Points to an existing "<span class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">resolvers<span class="caret"></span></a><ul class="dropdown-menu"><li class="dropdown-header">This keyword is available in sections :</li><li><a href="#resolvers%20%28Server%20and%20default-server%20options%29">Server and default-server options</a></li><li><a href="#resolvers%20%28The%20resolvers%20section%29">The resolvers section</a></li></ul></span>" section to resolve current server's |
20546 | | -hostname. |
| 20551 | +hostname. It is often recommended to disable libc-based resolution when using |
| 20552 | +resolvers, though exceptions exist (see <a href="#5.3.1">section 5.3.1</a>). In any case it is a |
| 20553 | +good practice to explicitly specify "<a href="#init-addr">init-addr</a>" when using resolvers in order |
| 20554 | +not to overlook this element. |
20547 | 20555 | </pre><div class="separator"> |
20548 | 20556 | <span class="label label-success">Example:</span> |
20549 | 20557 | <pre class="prettyprint"> |
20550 | | -<code>server s1 app1.domain.com:80 check resolvers mydns |
| 20558 | +<code>server s1 app1.domain.com:80 init-addr last,none check resolvers mydns |
20551 | 20559 | </code></pre> |
20552 | | -</div><pre class="text">See also <a href="#5.3">section 5.3</a> |
| 20560 | +</div><pre class="text">See also <a href="#5.3">section 5.3</a> for implementation details and traps to be aware of. |
20553 | 20561 | </pre><a class="anchor" name="send-proxy"></a><a class="anchor" name="5-send-proxy"></a><a class="anchor" name="5.2-send-proxy"></a><a class="anchor" name="send-proxy (Bind and server options)"></a><a class="anchor" name="send-proxy (Server and default-server options)"></a><div class="keyword"><b><a class="anchor" name="send-proxy"></a><a href="#5.2-send-proxy">send-proxy</a></b></div><pre class="text">The "<a href="#send-proxy">send-proxy</a>" parameter enforces use of the PROXY protocol over any |
20554 | 20562 | connection established to this server. The PROXY protocol informs the other |
20555 | 20563 | end about the layer 3/4 addresses of the incoming connection, so that it can |
@@ -20798,10 +20806,13 @@ <h2 id="chapter-5.3" data-target="5.3"><small><a class="small" href="#5.3">5.3.< |
20798 | 20806 | This is not sufficient in some cases, such as in Amazon where a server's IP |
20799 | 20807 | can change after a reboot or an ELB Virtual IP can change based on current |
20800 | 20808 | workload. |
| 20809 | + |
20801 | 20810 | This chapter describes how HAProxy can be configured to process server's name |
20802 | 20811 | resolution at run time. |
20803 | | -Whether run time server name resolution has been enable or not, HAProxy will |
20804 | | -carry on doing the first resolution when parsing the configuration. |
| 20812 | + |
| 20813 | +Whether run time server name resolution has been enable or not, by default |
| 20814 | +HAProxy will do the first resolution at startup during configuration parsing |
| 20815 | +via libc unless disabled by the "<a href="#init-addr">init-addr</a>" parameter. |
20805 | 20816 | </pre></div> |
20806 | 20817 | <a class="anchor" id="5.3.1" name="5.3.1"></a> |
20807 | 20818 | <h3 id="chapter-5.3.1" data-target="5.3.1"><small><a class="small" href="#5.3.1">5.3.1.</a></small> Global overview</h3> |
@@ -20833,6 +20844,17 @@ <h3 id="chapter-5.3.1" data-target="5.3.1"><small><a class="small" href="#5.3.1" |
20833 | 20844 |
|
20834 | 20845 | - a resolution is considered as invalid (NX, timeout, refused), when all the |
20835 | 20846 | servers return an error. |
| 20847 | + |
| 20848 | + - The DNS client implemented in HAProxy is very basic and will not understand |
| 20849 | + the vast number of options and advanced setups that an operating system's |
| 20850 | + resolver can deal with. As such, except for really trivial setups where a |
| 20851 | + server known by its FQDN only has exactly one IP address at a time and |
| 20852 | + might occasionally renew it (e.g. a reboot), it is highly recommended to |
| 20853 | + avoid mixing libc-based init-time resolution with DNS-based runtime |
| 20854 | + resolution, as such setups are known to cause failures upon address |
| 20855 | + renewal. As a conclusion, unless you know exactly what you are doing, you |
| 20856 | + should always exclude "libc" from "<a href="#init-addr">init-addr</a>" when using "<span class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">resolvers<span class="caret"></span></a><ul class="dropdown-menu"><li class="dropdown-header">This keyword is available in sections :</li><li><a href="#resolvers%20%28Server%20and%20default-server%20options%29">Server and default-server options</a></li><li><a href="#resolvers%20%28The%20resolvers%20section%29">The resolvers section</a></li></ul></span>" on a |
| 20857 | + server line. |
20836 | 20858 | </pre></div> |
20837 | 20859 | <a class="anchor" id="5.3.2" name="5.3.2"></a> |
20838 | 20860 | <h3 id="chapter-5.3.2" data-target="5.3.2"><small><a class="small" href="#5.3.2">5.3.2.</a></small> The resolvers section</h3> |
@@ -20959,6 +20981,8 @@ <h3 id="chapter-5.3.2" data-target="5.3.2"><small><a class="small" href="#5.3.2" |
20959 | 20981 | valid status from the DNS server. |
20960 | 20982 |
|
20961 | 20983 | A separate behavior exists for "hold valid" and "hold obsolete". |
| 20984 | + |
| 20985 | +Default value is 10s for "valid", 0s for "obsolete" and 30s for others. |
20962 | 20986 | </pre><a class="anchor" name="resolve_retries"></a><a class="anchor" name="5-resolve_retries"></a><a class="anchor" name="5.3.2-resolve_retries"></a><a class="anchor" name="resolve_retries (Bind and server options)"></a><a class="anchor" name="resolve_retries (The resolvers section)"></a><div class="keyword"><b><a class="anchor" name="resolve_retries"></a><a href="#5.3.2-resolve_retries">resolve_retries</a></b> <span style="color: #080"><nb></span></div><pre class="text">Defines the number <nb> of queries to send to resolve a server name before |
20963 | 20987 | giving up. |
20964 | 20988 | Default value: 3 |
@@ -27894,7 +27918,7 @@ <h2 id="chapter-11.3" data-target="11.3"><small><a class="small" href="#11.3">11 |
27894 | 27918 | <br> |
27895 | 27919 | <hr> |
27896 | 27920 | <div class="text-right"> |
27897 | | - HAProxy 2.8.15 – Configuration Manual<br> |
| 27921 | + HAProxy 2.8.15-33 – Configuration Manual<br> |
27898 | 27922 | <small>, 2025/04/22</small> |
27899 | 27923 | </div> |
27900 | 27924 | </div> |
|
0 commit comments