blob: fbaeef8716e8212ceabc2a60a0c15c1abec928a0 [file] [log] [blame]
Willy Tarreau6a06a402007-07-15 20:15:28 +02001 ----------------------
2 HAProxy
3 Configuration Manual
4 ----------------------
Willy Tarreau0ba27502007-12-24 16:55:16 +01005 version 1.3.14
Willy Tarreau6a06a402007-07-15 20:15:28 +02006 willy tarreau
Willy Tarreau0ba27502007-12-24 16:55:16 +01007 2007/12/24
Willy Tarreau6a06a402007-07-15 20:15:28 +02008
9
10This document covers the configuration language as implemented in the version
11specified above. It does not provide any hint, example or advice. For such
Willy Tarreau0ba27502007-12-24 16:55:16 +010012documentation, please refer to the Reference Manual or the Architecture Manual.
Willy Tarreau6a06a402007-07-15 20:15:28 +020013
14
15HAProxy's configuration process involves 3 major sources of parameters :
16
17 - the arguments from the command-line, which always take precedence
18 - the "global" section, which sets process-wide parameters
19 - the proxies sections which can take form of "defaults", "listen",
20 "frontend" and "backend".
21
Willy Tarreau0ba27502007-12-24 16:55:16 +010022The configuration file syntax consists in lines beginning with a keyword
23referenced in this manual, optionally followed by one or several parameters
24delimited by spaces. If spaces have to be entered in strings, then they must be
25preceeded by a backslash ('\') to be escaped. Backslashes also have to be
26escaped by doubling them.
27
28Some parameters involve values representating time, such as timeouts. These
29values are generally expressed in milliseconds (unless explicitly stated
30otherwise) but may be expressed in any other unit by suffixing the unit to the
31numeric value. It is important to consider this because it will not be repeated
32for every keyword. Supported units are :
33
34 - us : microseconds. 1 microsecond = 1/1000000 second
35 - ms : milliseconds. 1 millisecond = 1/1000 second. This is the default.
36 - s : seconds. 1s = 1000ms
37 - m : minutes. 1m = 60s = 60000ms
38 - h : hours. 1h = 60m = 3600s = 3600000ms
39 - d : days. 1d = 24h = 1440m = 86400s = 86400000ms
40
41
Willy Tarreau6a06a402007-07-15 20:15:28 +0200421. Global parameters
43--------------------
44
45Parameters in the "global" section are process-wide and often OS-specific. They
46are generally set once for all and do not need being changed once correct. Some
47of them have command-line equivalents.
48
49The following keywords are supported in the "global" section :
50
51 * Process management and security
52 - chroot
53 - daemon
54 - gid
55 - group
56 - log
57 - nbproc
58 - pidfile
59 - uid
60 - ulimit-n
61 - user
Willy Tarreaufbee7132007-10-18 13:53:22 +020062 - stats
Willy Tarreau6a06a402007-07-15 20:15:28 +020063
64 * Performance tuning
65 - maxconn
66 - noepoll
67 - nokqueue
68 - nopoll
69 - nosepoll
70 - tune.maxpollevents
Willy Tarreaufe255b72007-10-14 23:09:26 +020071 - spread-checks
Willy Tarreau6a06a402007-07-15 20:15:28 +020072
73 * Debugging
74 - debug
75 - quiet
Willy Tarreau6a06a402007-07-15 20:15:28 +020076
77
781.1) Process management and security
79------------------------------------
80
81chroot <jail dir>
82 Changes current directory to <jail dir> and performs a chroot() there before
83 dropping privileges. This increases the security level in case an unknown
84 vulnerability would be exploited, since it would make it very hard for the
85 attacker to exploit the system. This only works when the process is started
86 with superuser privileges. It is important to ensure that <jail_dir> is both
87 empty and unwritable to anyone.
88
89daemon
90 Makes the process fork into background. This is the recommended mode of
91 operation. It is equivalent to the command line "-D" argument. It can be
92 disabled by the command line "-db" argument.
93
94gid <number>
95 Changes the process' group ID to <number>. It is recommended that the group
96 ID is dedicated to HAProxy or to a small set of similar daemons. HAProxy must
97 be started with a user belonging to this group, or with superuser privileges.
98 See also "group" and "uid".
99
100group <group name>
101 Similar to "gid" but uses the GID of group name <group name> from /etc/group.
102 See also "gid" and "user".
103
104log <address> <facility> [max level]
105 Adds a global syslog server. Up to two global servers can be defined. They
106 will receive logs for startups and exits, as well as all logs from proxies
Robert Tsai81ae1952007-12-05 10:47:29 +0100107 configured with "log global".
108
109 <address> can be one of:
110
111 - An IPv4 address optionally followed by a colon and an UDP port. If
112 no port is specified, 514 is used by default (the standard syslog
113 port).
114
115 - A filesystem path to a UNIX domain socket, keeping in mind
116 considerations for chroot (be sure the path is accessible inside
117 the chroot) and uid/gid (be sure the path is appropriately
118 writeable).
119
120 <facility> must be one of the 24 standard syslog facilities :
Willy Tarreau6a06a402007-07-15 20:15:28 +0200121
122 kern user mail daemon auth syslog lpr news
123 uucp cron auth2 ftp ntp audit alert cron2
124 local0 local1 local2 local3 local4 local5 local6 local7
125
126 An optional level can be specified to filter outgoing messages. By default,
127 all messages are sent. If a level is specified, only messages with a severity
128 at least as important as this level will be sent. 8 levels are known :
129
130 emerg alert crit err warning notice info debug
131
132nbproc <number>
133 Creates <number> processes when going daemon. This requires the "daemon"
134 mode. By default, only one process is created, which is the recommended mode
135 of operation. For systems limited to small sets of file descriptors per
136 process, it may be needed to fork multiple daemons. USING MULTIPLE PROCESSES
137 IS HARDER TO DEBUG AND IS REALLY DISCOURAGED. See also "daemon".
138
139pidfile <pidfile>
140 Writes pids of all daemons into file <pidfile>. This option is equivalent to
141 the "-p" command line argument. The file must be accessible to the user
142 starting the process. See also "daemon".
143
Willy Tarreaufbee7132007-10-18 13:53:22 +0200144stats socket <path> [{uid | user} <uid>] [{gid | group} <gid>] [mode <mode>]
145 Creates a UNIX socket in stream mode at location <path>. Any previously
146 existing socket will be backed up then replaced. Connections to this socket
147 will get a CSV-formated output of the process statistics in response to the
148 "show stat" command followed by a line feed. On platforms which support it,
149 it is possible to restrict access to this socket by specifying numerical IDs
150 after "uid" and "gid", or valid user and group names after the "user" and
151 "group" keywords. It is also possible to restrict permissions on the socket
152 by passing an octal value after the "mode" keyword (same syntax as chmod).
153 Depending on the platform, the permissions on the socket will be inherited
154 from the directory which hosts it, or from the user the process is started
155 with.
156
157stats timeout <timeout, in milliseconds>
158 The default timeout on the stats socket is set to 10 seconds. It is possible
159 to change this value with "stats timeout". The value must be passed in
Willy Tarreaubefdff12007-12-02 22:27:38 +0100160 milliseconds, or be suffixed by a time unit among { us, ms, s, m, h, d }.
Willy Tarreaufbee7132007-10-18 13:53:22 +0200161
162stats maxconn <connections>
163 By default, the stats socket is limited to 10 concurrent connections. It is
164 possible to change this value with "stats maxconn".
165
Willy Tarreau6a06a402007-07-15 20:15:28 +0200166uid <number>
167 Changes the process' user ID to <number>. It is recommended that the user ID
168 is dedicated to HAProxy or to a small set of similar daemons. HAProxy must
169 be started with superuser privileges in order to be able to switch to another
170 one. See also "gid" and "user".
171
172ulimit-n <number>
173 Sets the maximum number of per-process file-descriptors to <number>. By
174 default, it is automatically computed, so it is recommended not to use this
175 option.
176
177user <user name>
178 Similar to "uid" but uses the UID of user name <user name> from /etc/passwd.
179 See also "uid" and "group".
180
181
1821.2) Performance tuning
183-----------------------
184
185maxconn <number>
186 Sets the maximum per-process number of concurrent connections to <number>. It
187 is equivalent to the command-line argument "-n". Proxies will stop accepting
188 connections when this limit is reached. The "ulimit-n" parameter is
189 automatically adjusted according to this value. See also "ulimit-n".
190
191noepoll
192 Disables the use of the "epoll" event polling system on Linux. It is
193 equivalent to the command-line argument "-de". The next polling system
194 used will generally be "poll". See also "nosepoll", and "nopoll".
195
196nokqueue
197 Disables the use of the "kqueue" event polling system on BSD. It is
198 equivalent to the command-line argument "-dk". The next polling system
199 used will generally be "poll". See also "nopoll".
200
201nopoll
202 Disables the use of the "poll" event polling system. It is equivalent to the
203 command-line argument "-dp". The next polling system used will be "select".
Willy Tarreau0ba27502007-12-24 16:55:16 +0100204 It should never be needed to disable "poll" since it's available on all
Willy Tarreau6a06a402007-07-15 20:15:28 +0200205 platforms supported by HAProxy. See also "nosepoll", and "nopoll" and
206 "nokqueue".
207
208nosepoll
209 Disables the use of the "speculative epoll" event polling system on Linux. It
210 is equivalent to the command-line argument "-ds". The next polling system
211 used will generally be "epoll". See also "nosepoll", and "nopoll".
212
213tune.maxpollevents <number>
214 Sets the maximum amount of events that can be processed at once in a call to
215 the polling system. The default value is adapted to the operating system. It
216 has been noticed that reducing it below 200 tends to slightly decrease
217 latency at the expense of network bandwidth, and increasing it above 200
218 tends to trade latency for slightly increased bandwidth.
219
Willy Tarreaufe255b72007-10-14 23:09:26 +0200220spread-checks <0..50, in percent>
221 Sometimes it is desirable to avoid sending health checks to servers at exact
222 intervals, for instance when many logical servers are located on the same
223 physical server. With the help of this parameter, it becomes possible to add
224 some randomness in the check interval between 0 and +/- 50%. A value between
225 2 and 5 seems to show good results. The default value remains at 0.
226
Willy Tarreau6a06a402007-07-15 20:15:28 +0200227
2281.3) Debugging
229---------------
230
231debug
232 Enables debug mode which dumps to stdout all exchanges, and disables forking
233 into background. It is the equivalent of the command-line argument "-d". It
234 should never be used in a production configuration since it may prevent full
235 system startup.
236
237quiet
238 Do not display any message during startup. It is equivalent to the command-
239 line argument "-q".
240
Willy Tarreau6a06a402007-07-15 20:15:28 +0200241
2422) Proxies
243----------
Willy Tarreau0ba27502007-12-24 16:55:16 +0100244
Willy Tarreau6a06a402007-07-15 20:15:28 +0200245Proxy configuration can be located in a set of sections :
246 - defaults <name>
247 - frontend <name>
248 - backend <name>
249 - listen <name>
250
251A "defaults" section sets default parameters for all other sections following
252its declaration. Those default parameters are reset by the next "defaults"
253section. See below for the list of parameters which can be set in a "defaults"
Willy Tarreau0ba27502007-12-24 16:55:16 +0100254section. The name is optional but its use is encouraged for better readability.
Willy Tarreau6a06a402007-07-15 20:15:28 +0200255
256A "frontend" section describes a set of listening sockets accepting client
257connections.
258
259A "backend" section describes a set of servers to which the proxy will connect
260to forward incoming connections.
261
262A "listen" section defines a complete proxy with its frontend and backend
263parts combined in one section. It is generally useful for TCP-only traffic.
264
Willy Tarreau0ba27502007-12-24 16:55:16 +0100265All proxy names must be formed from upper and lower case letters, digits,
266'-' (dash), '_' (underscore) , '.' (dot) and ':' (colon). ACL names are
267case-sensitive, which means that "www" and "WWW" are two different proxies.
268
269Historically, all proxy names could overlap, it just caused troubles in the
270logs. Since the introduction of content switching, it is mandatory that two
271proxies with overlapping capabilities (frontend/backend) have different names.
272However, it is still permitted that a frontend and a backend share the same
273name, as this configuration seems to be commonly encountered.
274
275Right now, two major proxy modes are supported : "tcp", also known as layer 4,
276and "http", also known as layer 7. In layer 4 mode, HAProxy simply forwards
277bidirectionnal traffic between two sides. In layer 7 mode, HAProxy analyzes the
278protocol, and can interact with it by allowing, blocking, switching, adding,
279modifying, or removing arbitrary contents in requests or responses, based on
280arbitrary criteria.
281
282
2832.1) Quick reminder about HTTP
284------------------------------
285
286When a proxy is running in HTTP mode, both the request and the response are
287fully analyzed and indexed, thus it becomes possible to build matching criteria
288on almost anything found in the contents.
289
290However, it is important to understand how HTTP requests and responses are
291formed, and how HAProxy decomposes them. It will then become easier to write
292correct rules and to debug existing configurations.
293
294
2952.1.1) The HTTP transaction model
296---------------------------------
297
298The HTTP protocol is transaction-driven. This means that each request will lead
299to one and only one response. Traditionnally, a TCP connection is established
300from the client to the server, a request is sent by the client on the
301connection, the server responds and the connection is closed. A new request
302will involve a new connection :
303
304 [CON1] [REQ1] ... [RESP1] [CLO1] [CON2] [REQ2] ... [RESP2] [CLO2] ...
305
306In this mode, called the "HTTP close" mode, there are as many connection
307establishments as there are HTTP transactions. Since the connection is closed
308by the server after the response, the client does not need to know the content
309length.
310
311Due to the transactional nature of the protocol, it was possible to improve it
312to avoid closing a connection between two subsequent transactions. In this mode
313however, it is mandatory that the server indicates the content length for each
314response so that the client does not wait indefinitely. For this, a special
315header is used: "Content-length". This mode is called the "keep-alive" mode :
316
317 [CON] [REQ1] ... [RESP1] [REQ2] ... [RESP2] [CLO] ...
318
319Its advantages are a reduced latency between transactions, and less processing
320power required on the server side. It is generally better than the close mode,
321but not always because the clients often limit their concurrent connections to
322a smaller value. HAProxy currently does not support the HTTP keep-alive mode,
323but knows how to transform it to the close mode.
324
325A last improvement in the communications is the pipelining mode. It still uses
326keep-alive, but the client does not wait for the first response to send the
327second request. This is useful for fetching large number of images composing a
328page :
329
330 [CON] [REQ1] [REQ2] ... [RESP1] [RESP2] [CLO] ...
331
332This can obviously have a tremendous benefit on performance because the network
333latency is eliminated between subsequent requests. Many HTTP agents do not
334correctly support pipelining since there is no way to associate a response with
335the corresponding request in HTTP. For this reason, it is mandatory for the
336server to reply in the exact same order as the requests were received.
337
338Right now, HAProxy only supports the first mode (HTTP close) if it needs to
339process the request. This means that for each request, there will be one TCP
340connection. If keep-alive or pipelining are required, HAProxy will still
341support them, but will only see the first request and the first response of
342each transaction. While this is generally problematic with regards to logs,
343content switching or filtering, it most often causes no problem for persistence
344with cookie insertion.
345
346
3472.1.2) HTTP request
348-------------------
349
350First, let's consider this HTTP request :
351
352 Line Contents
353 number
354 1 GET /serv/login.php?lang=en&profile=2 HTTP/1.1
355 2 Host: www.mydomain.com
356 3 User-agent: my small browser
357 4 Accept: image/jpeg, image/gif
358 5 Accept: image/png
359
360
3612.1.2.1) The Request line
362-------------------------
363
364Line 1 is the "request line". It is always composed of 3 fields :
365
366 - a METHOD : GET
367 - a URI : /serv/login.php?lang=en&profile=2
368 - a version tag : HTTP/1.1
369
370All of them are delimited by what the standard calls LWS (linear white spaces),
371which are commonly spaces, but can also be tabs or line feeds/carriage returns
372followed by spaces/tabs. The method itself cannot contain any colon (':') and
373is limited to alphabetic letters. All those various combinations make it
374desirable that HAProxy performs the splitting itself rather than leaving it to
375the user to write a complex or inaccurate regular expression.
376
377The URI itself can have several forms :
378
379 - A "relative URI" :
380
381 /serv/login.php?lang=en&profile=2
382
383 It is a complete URL without the host part. This is generally what is
384 received by servers, reverse proxies and transparent proxies.
385
386 - An "absolute URI", also called a "URL" :
387
388 http://192.168.0.12:8080/serv/login.php?lang=en&profile=2
389
390 It is composed of a "scheme" (the protocol name followed by '://'), a host
391 name or address, optionally a colon (':') followed by a port number, then
392 a relative URI beginning at the first slash ('/') after the address part.
393 This is generally what proxies receive, but a server supporting HTTP/1.1
394 must accept this form too.
395
396 - a star ('*') : this form is only accepted in association with the OPTIONS
397 method and is not relayable. It is used to inquiry a next hop's
398 capabilities.
399
400 - an address:port combination : 192.168.0.12:80
401 This is used with the CONNECT method, which is used to establish TCP
402 tunnels through HTTP proxies, generally for HTTPS, but sometimes for
403 other protocols too.
404
405In a relative URI, two sub-parts are identified. The part before the question
406mark is called the "path". It is typically the relative path to static objects
407on the server. The part after the question mark is called the "query string".
408It is mostly used with GET requests sent to dynamic scripts and is very
409specific to the language, framework or application in use.
410
411
4122.1.2.2) The request headers
413----------------------------
414
415The headers start at the second line. They are composed of a name at the
416beginning of the line, immediately followed by a colon (':'). Traditionally,
417an LWS is added after the colon but that's not required. Then come the values.
418Multiple identical headers may be folded into one single line, delimiting the
419values with commas, provided that their order is respected. This is commonly
420encountered in the 'Cookie:' field. A header may span over multiple lines if
421the subsequent lines begin with an LWS. In the example in 2.1.2, lines 4 and 5
422define a total of 3 values for the 'Accept:' header.
423
424Contrary to a common mis-conception, header names are not case-sensitive, and
425their values are not either if they refer to other header names (such as the
426'Connection:' header).
427
428The end of the headers is indicated by the first empty line. People often say
429that it's a double line feed, which is not exact, even if a double line feed
430is one valid form of empty line.
431
432Fortunately, HAProxy takes care of all these complex combinations when indexing
433headers, checking values and counting them, so there is no reason to worry
434about the way they could be written, but it is important not to accusate an
435application of being buggy if it does unusual, valid things.
436
437Important note:
438 As suggested by RFC2616, HAProxy normalizes headers by replacing line breaks
439 in the middle of headers by LWS in order to join multi-line headers. This
440 is necessary for proper analysis and helps less capable HTTP parsers to work
441 correctly and not to be fooled by such complex constructs.
442
443
4442.1.3) HTTP response
445--------------------
446
447An HTTP response looks very much like an HTTP request. Both are called HTTP
448messages. Let's consider this HTTP response :
449
450 Line Contents
451 number
452 1 HTTP/1.1 200 OK
453 2 Content-length: 350
454 3 Content-Type: text/html
455
456
4572.1.3.1) The Response line
458--------------------------
459
460Line 1 is the "response line". It is always composed of 3 fields :
461
462 - a version tag : HTTP/1.1
463 - a status code : 200
464 - a reason : OK
465
466The status code is always 3-digit. The first digit indicates a general status :
467 - 2xx = OK, content is following (eg: 200, 206)
468 - 3xx = OK, no content following (eg: 302, 304)
469 - 4xx = error caused by the client (eg: 401, 403, 404)
470 - 5xx = error caused by the server (eg: 500, 502, 503)
471
472Please refer to RFC2616 for the detailed meaning of all such codes. The
473"reason" field is just a hint, but is not parsed by clients. Anything can be
474found there, but it's a common practise to respect the well-established
475messages. It can be composed of one or multiple words, such as "OK", "Found",
476or "Authentication Required".
477
478
4792.1.3.2) The response headers
480-----------------------------
481
482Response headers work exactly like request headers, and as such, HAProxy uses
483the same parsing function for both. Please refer to paragraph 2.1.2.2 for more
484details.
485
486
4872.2) Proxy keywords matrix
488----------------------------
489
Willy Tarreau6a06a402007-07-15 20:15:28 +0200490The following list of keywords is supported. Most of them may only be used in a
Willy Tarreau0ba27502007-12-24 16:55:16 +0100491limited set of section types. Some of them are marked as "deprecated" because
492they are inherited from an old syntax which may be confusing or functionnally
Krzysztof Oledzki336d4752007-12-25 02:40:22 +0100493limited, and there are new recommended keywords to replace them. Keywords
494listed with [no] can be optionally inverted using the "no" prefix, ex. "no
495option contstats". This makes sense when the option has been enabled by default
496and must be disabled for a specific instance.
Willy Tarreau0ba27502007-12-24 16:55:16 +0100497
Willy Tarreau6a06a402007-07-15 20:15:28 +0200498
499keyword defaults frontend listen backend
500----------------------+----------+----------+---------+---------
501acl - X X X
502appsession - - X X
Willy Tarreau0ba27502007-12-24 16:55:16 +0100503balance X - X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200504bind - X X -
505block - X X X
Willy Tarreau0ba27502007-12-24 16:55:16 +0100506capture cookie - X X -
507capture request header - X X -
508capture response header - X X -
Willy Tarreaue219db72007-12-03 01:30:13 +0100509clitimeout X X X - (deprecated)
Willy Tarreau0ba27502007-12-24 16:55:16 +0100510contimeout X - X X (deprecated)
Willy Tarreau6a06a402007-07-15 20:15:28 +0200511cookie X - X X
512default_backend - X X -
Willy Tarreau0ba27502007-12-24 16:55:16 +0100513disabled X X X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200514dispatch - - X X
Willy Tarreau0ba27502007-12-24 16:55:16 +0100515enabled X X X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200516errorfile X X X X
517errorloc X X X X
518errorloc302 X X X X
519errorloc303 X X X X
520fullconn X - X X
521grace - X X X
Willy Tarreaudbc36f62007-11-30 12:29:11 +0100522http-check disable-on-404 X - X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200523log X X X X
524maxconn X X X -
525mode X X X X
Willy Tarreauc7246fc2007-12-02 17:31:20 +0100526monitor fail - X X -
Willy Tarreau6a06a402007-07-15 20:15:28 +0200527monitor-net X X X -
528monitor-uri X X X -
Krzysztof Oledzki336d4752007-12-25 02:40:22 +0100529[no] option abortonclose X - X X
530[no] option allbackups X - X X
531[no] option checkcache X - X X
532[no] option clitcpka X X X -
533[no] option contstats X X X -
534[no] option dontlognull X X X -
535[no] option forceclose X - X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200536option forwardfor X X X X
Krzysztof Oledzki336d4752007-12-25 02:40:22 +0100537[no] option http_proxy X X X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200538option httpchk X - X X
Krzysztof Oledzki336d4752007-12-25 02:40:22 +0100539[no] option httpclose X X X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200540option httplog X X X X
Krzysztof Oledzki336d4752007-12-25 02:40:22 +0100541[no] option logasap X X X -
542[no] option nolinger X X X X
543[no] option persist X - X X
544[no] option redispatch X - X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200545option smtpchk X - X X
Krzysztof Oledzki336d4752007-12-25 02:40:22 +0100546[no] option srvtcpka X - X X
Willy Tarreau6a06a402007-07-15 20:15:28 +0200547option ssl-hello-chk X - X X
548option tcpka X X X X
549option tcplog X X X X
Krzysztof Oledzki336d4752007-12-25 02:40:22 +0100550[no] option tcpsplice X X X X
551[no] option transparent X X X -
552redisp X - X X (deprecated)
553redispatch X - X X (deprecated)
Willy Tarreau6a06a402007-07-15 20:15:28 +0200554reqadd - X X X
555reqallow - X X X
556reqdel - X X X
557reqdeny - X X X
558reqiallow - X X X
559reqidel - X X X
560reqideny - X X X
561reqipass - X X X
562reqirep - X X X
563reqisetbe - X X X
564reqitarpit - X X X
565reqpass - X X X
566reqrep - X X X
567reqsetbe - X X X
568reqtarpit - X X X
569retries X - X X
570rspadd - X X X
571rspdel - X X X
572rspdeny - X X X
573rspidel - X X X
574rspideny - X X X
575rspirep - X X X
576rsprep - X X X
577server - - X X
578source X - X X
Willy Tarreaue219db72007-12-03 01:30:13 +0100579srvtimeout X - X X (deprecated)
Willy Tarreau24e779b2007-07-24 23:43:37 +0200580stats auth X - X X
581stats enable X - X X
582stats realm X - X X
Willy Tarreaubbd42122007-07-25 07:26:38 +0200583stats refresh X - X X
Willy Tarreau24e779b2007-07-24 23:43:37 +0200584stats scope X - X X
585stats uri X - X X
Krzysztof Oledzkid9db9272007-10-15 10:05:11 +0200586stats hide-version X - X X
Willy Tarreaue219db72007-12-03 01:30:13 +0100587timeout appsession X - X X
588timeout client X X X -
589timeout clitimeout X X X - (deprecated)
590timeout connect X - X X
591timeout contimeout X - X X (deprecated)
592timeout queue X - X X
593timeout server X - X X
594timeout srvtimeout X - X X (deprecated)
595timeout tarpit X X X -
Willy Tarreau6a06a402007-07-15 20:15:28 +0200596transparent X X X -
597use_backend - X X -
598usesrc X - X X
599----------------------+----------+----------+---------+---------
600keyword defaults frontend listen backend
601
Willy Tarreau0ba27502007-12-24 16:55:16 +0100602
6032.2.1) Alphabetically sorted keywords reference
604-----------------------------------------------
605
606This section provides a description of each keyword and its usage.
607
608
609acl <aclname> <criterion> [flags] [operator] <value> ...
610 Declare or complete an access list.
611 May be used in sections : defaults | frontend | listen | backend
612 no | yes | yes | yes
613 Example:
614 acl invalid_src src 0.0.0.0/7 224.0.0.0/3
615 acl invalid_src src_port 0:1023
616 acl local_dst hdr(host) -i localhost
617
618 See section 2.3 about ACL usage.
619
620
621appsession <cookie> len <length> timeout <holdtime>
622 Define session stickiness on an existing application cookie.
623 May be used in sections : defaults | frontend | listen | backend
624 no | no | yes | yes
625 Arguments :
626 <cookie> this is the name of the cookie used by the application and which
627 HAProxy will have to learn for each new session.
628
629 <length> this is the number of characters that will be memorized and
630 checked in each cookie value.
631
632 <holdtime> this is the time after which the cookie will be removed from
633 memory if unused. If no unit is specified, this time is in
634 milliseconds.
635
636 When an application cookie is defined in a backend, HAProxy will check when
637 the server sets such a cookie, and will store its value in a table, and
638 associate it with the server's identifier. Up to <length> characters from
639 the value will be retained. On each connection, haproxy will look for this
640 cookie both in the "Cookie:" headers, and as a URL parameter in the query
641 string. If a known value is found, the client will be directed to the server
642 associated with this value. Otherwise, the load balancing algorithm is
643 applied. Cookies are automatically removed from memory when they have been
644 unused for a duration longer than <holdtime>.
645
646 The definition of an application cookie is limited to one per backend.
647
648 Example :
649 appsession JSESSIONID len 52 timeout 3h
650
651 See also : "cookie", "capture cookie" and "balance".
652
653
654balance <algorithm> [ <arguments> ]
655 Define the load balancing algorithm to be used in a backend.
656 May be used in sections : defaults | frontend | listen | backend
657 yes | no | yes | yes
658 Arguments :
659 <algorithm> is the algorithm used to select a server when doing load
660 balancing. This only applies when no persistence information
661 is available, or when a connection is redispatched to another
662 server. <algorithm> may be one of the following :
663
664 roundrobin Each server is used in turns, according to their weights.
665 This is the smoothest and fairest algorithm when the server's
666 processing time remains equally distributed. This algorithm
667 is dynamic, which means that server weights may be adjusted
668 on the fly for slow starts for instance.
669
670 source The source IP address is hashed and divided by the total
671 weight of the running servers to designate which server will
672 receive the request. This ensures that the same client IP
673 address will always reach the same server as long as no
674 server goes down or up. If the hash result changes due to the
675 number of running servers changing, many clients will be
676 directed to a different server. This algorithm is generally
677 used in TCP mode where no cookie may be inserted. It may also
678 be used on the Internet to provide a best-effort stickyness
679 to clients which refuse session cookies. This algorithm is
680 static, which means that changing a server's weight on the
681 fly will have no effect.
682
683 uri The left part of the URI (before the question mark) is hashed
684 and divided by the total weight of the running servers. The
685 result designates which server will receive the request. This
686 ensures that a same URI will always be directed to the same
687 server as long as no server goes up or down. This is used
688 with proxy caches and anti-virus proxies in order to maximize
689 the cache hit rate. Note that this algorithm may only be used
690 in an HTTP backend. This algorithm is static, which means
691 that changing a server's weight on the fly will have no
692 effect.
693
694 url_param The URL parameter specified in argument will be looked up in
695 the query string of each HTTP request. If it is found
696 followed by an equal sign ('=') and a value, then the value
697 is hashed and divided by the total weight of the running
698 servers. The result designates which server will receive the
699 request. This is used to track user identifiers in requests
700 and ensure that a same user ID will always be sent to the
701 same server as long as no server goes up or down. If no value
702 is found or if the parameter is not found, then a round robin
703 algorithm is applied. Note that this algorithm may only be
704 used in an HTTP backend. This algorithm is static, which
705 means that changing a server's weight on the fly will have no
706 effect.
707
708 <arguments> is an optional list of arguments which may be needed by some
709 algorithms. Right now, only the "url_param" algorithm supports
710 a mandatory argument.
711
712 The definition of the load balancing algorithm is mandatory for a backend
713 and limited to one per backend.
714
715 Examples :
716 balance roundrobin
717 balance url_param userid
718
719 See also : "dispatch", "cookie", "appsession", "transparent" and "http_proxy".
720
721
722bind [<address>]:<port> [, ...]
723 Define one or several listening addresses and/or ports in a frontend.
724 May be used in sections : defaults | frontend | listen | backend
725 no | yes | yes | no
726 Arguments :
727 <address> is optional and can be a host name, an IPv4 address, an IPv6
728 address, or '*'. It designates the address the frontend will
729 listen on. If unset, all IPv4 addresses of the system will be
730 listened on. The same will apply for '*' or the system's special
731 address "0.0.0.0".
732
733 <port> is the TCP port number the proxy will listen on. The port is
734 mandatory. Note that in the case of an IPv6 address, the port is
735 always the number after the last colon (':').
736
737 It is possible to specify a list of address:port combinations delimited by
738 commas. The frontend will then listen on all of these addresses. There is no
739 fixed limit to the number of addresses and ports which can be listened on in
740 a frontend, as well as there is no limit to the number of "bind" statements
741 in a frontend.
742
743 Example :
744 listen http_proxy
745 bind :80,:443
746 bind 10.0.0.1:10080,10.0.0.1:10443
747
748 See also : "source".
749
750
751block { if | unless } <condition>
752 Block a layer 7 request if/unless a condition is matched
753 May be used in sections : defaults | frontend | listen | backend
754 no | yes | yes | yes
755
756 The HTTP request will be blocked very early in the layer 7 processing
757 if/unless <condition> is matched. A 403 error will be returned if the request
758 is blocked. The condition has to reference ACLs (see section 2.3). This is
759 typically used to deny access to certain sensible resources if some
760 conditions are met or not met. There is no fixed limit to the number of
761 "block" statements per instance.
762
763 Example:
764 acl invalid_src src 0.0.0.0/7 224.0.0.0/3
765 acl invalid_src src_port 0:1023
766 acl local_dst hdr(host) -i localhost
767 block if invalid_src || local_dst
768
769 See section 2.3 about ACL usage.
770
771
772capture cookie <name> len <length>
773 Capture and log a cookie in the request and in the response.
774 May be used in sections : defaults | frontend | listen | backend
775 no | yes | yes | no
776 Arguments :
777 <name> is the beginning of the name of the cookie to capture. In order
778 to match the exact name, simply suffix the name with an equal
779 sign ('='). The full name will appear in the logs, which is
780 useful with application servers which adjust both the cookie name
781 and value (eg: ASPSESSIONXXXXX).
782
783 <length> is the maximum number of characters to report in the logs, which
784 include the cookie name, the equal sign and the value, all in the
785 standard "name=value" form. The string will be truncated on the
786 right if it exceeds <length>.
787
788 Only the first cookie is captured. Both the "cookie" request headers and the
789 "set-cookie" response headers are monitored. This is particularly useful to
790 check for application bugs causing session crossing or stealing between
791 users, because generally the user's cookies can only change on a login page.
792
793 When the cookie was not presented by the client, the associated log column
794 will report "-". When a request does not cause a cookie to be assigned by the
795 server, a "-" is reported in the response column.
796
797 The capture is performed in the frontend only because it is necessary that
798 the log format does not change for a given frontend depending on the
799 backends. This may change in the future. Note that there can be only one
800 "capture cookie" statement in a frontend. The maximum capture length is
801 configured in the souces by default to 64 characters. It is not possible to
802 specify a capture in a "defaults" section.
803
804 Example:
805 capture cookie ASPSESSION len 32
806
807 See also : "capture request header", "capture response header" as well as
808 section 2.4 about logging.
809
810
811capture request header <name> len <length>
812 Capture and log the first occurrence of the specified request header.
813 May be used in sections : defaults | frontend | listen | backend
814 no | yes | yes | no
815 Arguments :
816 <name> is the name of the header to capture. The header names are not
817 case-sensitive, but it is a common practise to write them as they
818 appear in the requests, with the first letter of each word in
819 upper case. The header name will not appear in the logs, only the
820 value is reported, but the position in the logs is respected.
821
822 <length> is the maximum number of characters to extract from the value and
823 report in the logs. The string will be truncated on the right if
824 it exceeds <length>.
825
826 Only the first value of the first occurrence of the header is captured. The
827 value will be added to the logs between braces ('{}'). If multiple headers
828 are captured, they will be delimited by a vertical bar ('|') and will appear
829 in the same order they were declared in the configuration. Common uses for
830 request header captures include the "Host" field in virtual hosting
831 environments, the "Content-length" when uploads are supported, "User-agent"
832 to quickly differenciate between real users and robots, and "X-Forwarded-For"
833 in proxied environments to find where the request came from.
834
835 There is no limit to the number of captured request headers, but each capture
836 is limited to 64 characters. In order to keep log format consistent for a
837 same frontend, header captures can only be declared in a frontend. It is not
838 possible to specify a capture in a "defaults" section.
839
840 Example:
841 capture request header Host len 15
842 capture request header X-Forwarded-For len 15
843 capture request header Referrer len 15
844
845 See also : "capture cookie", "capture response header" as well as section 2.4
846 about logging.
847
848
849capture response header <name> len <length>
850 Capture and log the first occurrence of the specified response header.
851 May be used in sections : defaults | frontend | listen | backend
852 no | yes | yes | no
853 Arguments :
854 <name> is the name of the header to capture. The header names are not
855 case-sensitive, but it is a common practise to write them as they
856 appear in the response, with the first letter of each word in
857 upper case. The header name will not appear in the logs, only the
858 value is reported, but the position in the logs is respected.
859
860 <length> is the maximum number of characters to extract from the value and
861 report in the logs. The string will be truncated on the right if
862 it exceeds <length>.
863
864 Only the first value of the first occurrence of the header is captured. The
865 result will be added to the logs between braces ('{}') after the captured
866 request headers. If multiple headers are captured, they will be delimited by
867 a vertical bar ('|') and will appear in the same order they were declared in
868 the configuration. Common uses for response header captures include the
869 "Content-length" header which indicates how many bytes are expected to be
870 returned, the "Location" header to track redirections.
871
872 There is no limit to the number of captured response headers, but each
873 capture is limited to 64 characters. In order to keep log format consistent
874 for a same frontend, header captures can only be declared in a frontend. It
875 is not possible to specify a capture in a "defaults" section.
876
877 Example:
878 capture response header Content-length len 9
879 capture response header Location len 15
880
881 See also : "capture cookie", "capture request header" as well as section 2.4
882 about logging.
883
884
885clitimeout <timeout>
886 Set the maximum inactivity time on the client side.
887 May be used in sections : defaults | frontend | listen | backend
888 yes | yes | yes | no
889 Arguments :
890 <timeout> is the timeout value is specified in milliseconds by default, but
891 can be in any other unit if the number is suffixed by the unit,
892 as explained at the top of this document.
893
894 The inactivity timeout applies when the client is expected to acknowledge or
895 send data. In HTTP mode, this timeout is particularly important to consider
896 during the first phase, when the client sends the request, and during the
897 response while it is reading data sent by the server. The value is specified
898 in milliseconds by default, but can be in any other unit if the number is
899 suffixed by the unit, as specified at the top of this document. In TCP mode
900 (and to a lesser extent, in HTTP mode), it is highly recommended that the
901 client timeout remains equal to the server timeout in order to avoid complex
902 situations to debug. It is a good practise to cover one or several TCP packet
903 losses by specifying timeouts that are slightly above multiples of 3 seconds
904 (eg: 4 or 5 seconds).
905
906 This parameter is specific to frontends, but can be specified once for all in
907 "defaults" sections. This is in fact one of the easiest solutions not to
908 forget about it. An unspecified timeout results in an infinite timeout, which
909 is not recommended. Such a usage is accepted and works but reports a warning
910 during startup because it may results in accumulation of expired sessions in
911 the system if the system's timeouts are not configured either.
912
913 This parameter is provided for compatibility but is currently deprecated.
914 Please use "timeout client" instead.
915
916 See also : "timeout client", "timeout server", "srvtimeout".
917
918
919contimeout <timeout>
920 Set the maximum time to wait for a connection attempt to a server to succeed.
921 May be used in sections : defaults | frontend | listen | backend
922 yes | no | yes | yes
923 Arguments :
924 <timeout> is the timeout value is specified in milliseconds by default, but
925 can be in any other unit if the number is suffixed by the unit,
926 as explained at the top of this document.
927
928 If the server is located on the same LAN as haproxy, the connection should be
929 immediate (less than a few milliseconds). Anyway, it is a good practise to
930 cover one or several TCP packet losses by specifying timeouts that are
931 slightly above multiples of 3 seconds (eg: 4 or 5 seconds). By default, the
932 connect timeout also presets the queue timeout to the same value if this one
933 has not been specified. Historically, the contimeout was also used to set the
934 tarpit timeout in a listen section, which is not possible in a pure frontend.
935
936 This parameter is specific to backends, but can be specified once for all in
937 "defaults" sections. This is in fact one of the easiest solutions not to
938 forget about it. An unspecified timeout results in an infinite timeout, which
939 is not recommended. Such a usage is accepted and works but reports a warning
940 during startup because it may results in accumulation of failed sessions in
941 the system if the system's timeouts are not configured either.
942
943 This parameter is provided for backwards compatibility but is currently
944 deprecated. Please use "timeout connect", "timeout queue" or "timeout tarpit"
945 instead.
946
947 See also : "timeout connect", "timeout queue", "timeout tarpit",
948 "timeout server", "contimeout".
949
950
951cookie <name> [ rewrite|insert|prefix ] [ indirect ] [ nocache ] [ postonly ]
952 Enable cookie-based persistence in a backend.
953 May be used in sections : defaults | frontend | listen | backend
954 yes | no | yes | yes
955 Arguments :
956 <name> is the name of the cookie which will be monitored, modified or
957 inserted in order to bring persistence. This cookie is sent to
958 the client via a "Set-Cookie" header in the response, and is
959 brought back by the client in a "Cookie" header in all requests.
960 Special care should be taken to choose a name which does not
961 conflict with any likely application cookie. Also, if the same
962 backends are subject to be used by the same clients (eg:
963 HTTP/HTTPS), care should be taken to use different cookie names
964 between all backends if persistence between them is not desired.
965
966 rewrite This keyword indicates that the cookie will be provided by the
967 server and that haproxy will have to modify its value to set the
968 server's identifier in it. This mode is handy when the management
969 of complex combinations of "Set-cookie" and "Cache-control"
970 headers is left to the application. The application can then
971 decide whether or not it is appropriate to emit a persistence
972 cookie. Since all responses should be monitored, this mode only
973 works in HTTP close mode. Unless the application behaviour is
974 very complex and/or broken, it is advised not to start with this
975 mode for new deployments. This keyword is incompatible with
976 "insert" and "prefix".
977
978 insert This keyword indicates that the persistence cookie will have to
979 be inserted by haproxy in the responses. If the server emits a
980 cookie with the same name, it will be replaced anyway. For this
981 reason, this mode can be used to upgrade existing configurations
982 running in the "rewrite" mode. The cookie will only be a session
983 cookie and will not be stored on the client's disk. Due to
984 caching effects, it is generally wise to add the "indirect" and
985 "nocache" or "postonly" keywords (see below). The "insert"
986 keyword is not compatible with "rewrite" and "prefix".
987
988 prefix This keyword indicates that instead of relying on a dedicated
989 cookie for the persistence, an existing one will be completed.
990 This may be needed in some specific environments where the client
991 does not support more than one single cookie and the application
992 already needs it. In this case, whenever the server sets a cookie
993 named <name>, it will be prefixed with the server's identifier
994 and a delimiter. The prefix will be removed from all client
995 requests so that the server still finds the cookie it emitted.
996 Since all requests and responses are subject to being modified,
997 this mode requires the HTTP close mode. The "prefix" keyword is
998 not compatible with "rewrite" and "insert".
999
1000 indirect When this option is specified in insert mode, cookies will only
1001 be added when the server was not reached after a direct access,
1002 which means that only when a server is elected after applying a
1003 load-balancing algorithm, or after a redispatch, then the cookie
1004 will be inserted. If the client has all the required information
1005 to connect to the same server next time, no further cookie will
1006 be inserted. In all cases, when the "indirect" option is used in
1007 insert mode, the cookie is always removed from the requests
1008 transmitted to the server. The persistence mechanism then becomes
1009 totally transparent from the application point of view.
1010
1011 nocache This option is recommended in conjunction with the insert mode
1012 when there is a cache between the client and HAProxy, as it
1013 ensures that a cacheable response will be tagged non-cacheable if
1014 a cookie needs to be inserted. This is important because if all
1015 persistence cookies are added on a cacheable home page for
1016 instance, then all customers will then fetch the page from an
1017 outer cache and will all share the same persistence cookie,
1018 leading to one server receiving much more traffic than others.
1019 See also the "insert" and "postonly" options.
1020
1021 postonly This option ensures that cookie insertion will only be performed
1022 on responses to POST requests. It is an alternative to the
1023 "nocache" option, because POST responses are not cacheable, so
1024 this ensures that the persistence cookie will never get cached.
1025 Since most sites do not need any sort of persistence before the
1026 first POST which generally is a login request, this is a very
1027 efficient method to optimize caching without risking to find a
1028 persistence cookie in the cache.
1029 See also the "insert" and "nocache" options.
1030
1031 There can be only one persistence cookie per HTTP backend, and it can be
1032 declared in a defaults section. The value of the cookie will be the value
1033 indicated after the "cookie" keyword in a "server" statement. If no cookie
1034 is declared for a given server, the cookie is not set.
Willy Tarreau6a06a402007-07-15 20:15:28 +02001035
Willy Tarreau0ba27502007-12-24 16:55:16 +01001036 Examples :
1037 cookie JSESSIONID prefix
1038 cookie SRV insert indirect nocache
1039 cookie SRV insert postonly indirect
1040
1041 See also : "appsession", "balance source", "capture cookie", "server".
1042
1043
1044default_backend <backend>
1045 Specify the backend to use when no "use_backend" rule has been matched.
1046 May be used in sections : defaults | frontend | listen | backend
1047 yes | yes | yes | no
1048 Arguments :
1049 <backend> is the name of the backend to use.
1050
1051 When doing content-switching between frontend and backends using the
1052 "use_backend" keyword, it is often useful to indicate which backend will be
1053 used when no rule has matched. It generally is the dynamic backend which
1054 will catch all undetermined requests.
1055
1056 The "default_backend" keyword is also supported in TCP mode frontends to
1057 facilitate the ordering of configurations in frontends and backends,
1058 eventhough it does not make much more sense in case of TCP due to the fact
1059 that use_backend currently does not work in TCP mode.
1060
1061 Example :
1062
1063 use_backend dynamic if url_dyn
1064 use_backend static if url_css url_img extension_img
1065 default_backend dynamic
1066
1067
1068disabled
1069 Disable a proxy, frontend or backend.
1070 May be used in sections : defaults | frontend | listen | backend
1071 yes | yes | yes | yes
1072 Arguments : none
1073
1074 The "disabled" keyword is used to disable an instance, mainly in order to
1075 liberate a listening port or to temporarily disable a service. The instance
1076 will still be created and its configuration will be checked, but it will be
1077 created in the "stopped" state and will appear as such in the statistics. It
1078 will not receive any traffic nor will it send any health-checks or logs. It
1079 is possible to disable many instances at once by adding the "disabled"
1080 keyword in a "defaults" section.
1081
1082 See also : "enabled"
1083
1084
1085enabled
1086 Enable a proxy, frontend or backend.
1087 May be used in sections : defaults | frontend | listen | backend
1088 yes | yes | yes | yes
1089 Arguments : none
1090
1091 The "enabled" keyword is used to explicitly enable an instance, when the
1092 defaults has been set to "disabled". This is very rarely used.
1093
1094 See also : "disabled"
1095
1096
1097errorfile <code> <file>
1098 Return a file contents instead of errors generated by HAProxy
1099 May be used in sections : defaults | frontend | listen | backend
1100 yes | yes | yes | yes
1101 Arguments :
1102 <code> is the HTTP status code. Currently, HAProxy is capable of
1103 generating codes 400, 403, 408, 500, 502, 503, and 504.
1104
1105 <file> designates a file containing the full HTTP response. It is
1106 recommended to follow the common practise of appending ".http" to
1107 the filename so that people do not confuse the response with HTML
1108 error pages.
1109
1110 It is important to understand that this keyword is not meant to rewrite
1111 errors returned by the server, but errors detected and returned by HAProxy.
1112 This is why the list of supported errors is limited to a small set.
1113
1114 The files are returned verbatim on the TCP socket. This allows any trick such
1115 as redirections to another URL or site, as well as tricks to clean cookies,
1116 force enable or disable caching, etc... The package provides default error
1117 files returning the same contents as default errors.
1118
1119 The files are read at the same time as the configuration and kept in memory.
1120 For this reason, the errors continue to be returned even when the process is
1121 chrooted, and no file change is considered while the process is running. A
1122 simple method for developping those files consists in associating them to the
1123 403 status code and interrogating a blocked URL.
1124
1125 See also : "errorloc", "errorloc302", "errorloc303"
1126
1127
1128http-check disable-on-404
1129 Enable a maintenance mode upon HTTP/404 response to health-checks
1130 May be used in sections : defaults | frontend | listen | backend
1131 no | no | yes | yes
1132
1133 Arguments : none
1134
1135 When this option is set, a server which returns an HTTP code 404 will be
1136 excluded from further load-balancing, but will still receive persistent
1137 connections. This provides a very convenient method for Web administrators
1138 to perform a graceful shutdown of their servers. It is also important to note
1139 that a server which is detected as failed while it was in this mode will not
1140 generate an alert, just a notice. If the server responds 2xx or 3xx again, it
1141 will immediately be reinserted into the farm. The status on the stats page
1142 reports "NOLB" for a server in this mode. It is important to note that this
1143 option only works in conjunction with the "httpchk" option.
1144
1145
1146monitor fail [if | unless] <condition>
1147 Add a condition to report a failure to a monitor request.
1148 May be used in sections : defaults | frontend | listen | backend
1149 no | yes | yes | no
1150
1151 Arguments :
1152 if <cond> the monitor request will fail if the condition is satisfied,
1153 and will succeed otherwise. The condition should describe a
1154 combinated test which must induce a failure if all conditions
1155 are met, for instance a low number of servers both in a
1156 backend and its backup.
1157
1158 unless <cond> the monitor request will succeed only if the condition is
1159 satisfied, and will fail otherwise. Such a condition may be
1160 based on a test on the presence of a minimum number of active
1161 servers in a list of backends.
1162
1163 This statement adds a condition which can force the response to a monitor
1164 request to report a failure. By default, when an external component queries
1165 the URI dedicated to monitoring, a 200 response is returned. When one of the
1166 conditions above is met, haproxy will return 503 instead of 200. This is
1167 very useful to report a site failure to an external component which may base
1168 routing advertisements between multiple sites on the availability reported by
1169 haproxy. In this case, one would rely on an ACL involving the "nbsrv"
1170 criterion.
1171
1172 Example:
1173 frontend www
1174 acl site_dead nbsrv(dynamic) lt 2
1175 acl site_dead nbsrv(static) lt 2
1176 monitor-uri /site_alive
1177 monitor fail if site_dead
1178
1179
1180option contstats
1181 Enable continuous traffic statistics updates
1182 May be used in sections : defaults | frontend | listen | backend
1183 yes | yes | yes | no
1184 Arguments : none
1185
1186 By default, counters used for statistics calculation are incremented
1187 only when a session finishes. It works quite well when serving small
1188 objects, but with big ones (for example large images or archives) or
1189 with A/V streaming, a graph generated from haproxy counters looks like
1190 a hedgehog. With this option enabled counters get incremented continuously,
1191 during a whole session. Recounting touches a hotpath directly so
1192 it is not enabled by default, as it has small performance impact (~0.5%).
1193
1194
1195timeout client <timeout>
1196timeout clitimeout <timeout> (deprecated)
1197 Set the maximum inactivity time on the client side.
1198 May be used in sections : defaults | frontend | listen | backend
1199 yes | yes | yes | no
1200 Arguments :
1201 <timeout> is the timeout value is specified in milliseconds by default, but
1202 can be in any other unit if the number is suffixed by the unit,
1203 as explained at the top of this document.
1204
1205 The inactivity timeout applies when the client is expected to acknowledge or
1206 send data. In HTTP mode, this timeout is particularly important to consider
1207 during the first phase, when the client sends the request, and during the
1208 response while it is reading data sent by the server. The value is specified
1209 in milliseconds by default, but can be in any other unit if the number is
1210 suffixed by the unit, as specified at the top of this document. In TCP mode
1211 (and to a lesser extent, in HTTP mode), it is highly recommended that the
1212 client timeout remains equal to the server timeout in order to avoid complex
1213 situations to debug. It is a good practise to cover one or several TCP packet
1214 losses by specifying timeouts that are slightly above multiples of 3 seconds
1215 (eg: 4 or 5 seconds).
1216
1217 This parameter is specific to frontends, but can be specified once for all in
1218 "defaults" sections. This is in fact one of the easiest solutions not to
1219 forget about it. An unspecified timeout results in an infinite timeout, which
1220 is not recommended. Such a usage is accepted and works but reports a warning
1221 during startup because it may results in accumulation of expired sessions in
1222 the system if the system's timeouts are not configured either.
1223
1224 This parameter replaces the old, deprecated "clitimeout". It is recommended
1225 to use it to write new configurations. The form "timeout clitimeout" is
1226 provided only by backwards compatibility but its use is strongly discouraged.
1227
1228 See also : "clitimeout", "timeout server".
1229
1230
1231timeout connect <timeout>
1232timeout contimeout <timeout> (deprecated)
1233 Set the maximum time to wait for a connection attempt to a server to succeed.
1234 May be used in sections : defaults | frontend | listen | backend
1235 yes | no | yes | yes
1236 Arguments :
1237 <timeout> is the timeout value is specified in milliseconds by default, but
1238 can be in any other unit if the number is suffixed by the unit,
1239 as explained at the top of this document.
1240
1241 If the server is located on the same LAN as haproxy, the connection should be
1242 immediate (less than a few milliseconds). Anyway, it is a good practise to
1243 cover one or several TCP packet losses by specifying timeouts that are
1244 slightly above multiples of 3 seconds (eg: 4 or 5 seconds). By default, the
1245 connect timeout also presets the queue timeout to the same value if this one
1246 has not been specified.
1247
1248 This parameter is specific to backends, but can be specified once for all in
1249 "defaults" sections. This is in fact one of the easiest solutions not to
1250 forget about it. An unspecified timeout results in an infinite timeout, which
1251 is not recommended. Such a usage is accepted and works but reports a warning
1252 during startup because it may results in accumulation of failed sessions in
1253 the system if the system's timeouts are not configured either.
1254
1255 This parameter replaces the old, deprecated "contimeout". It is recommended
1256 to use it to write new configurations. The form "timeout contimeout" is
1257 provided only by backwards compatibility but its use is strongly discouraged.
1258
1259 See also : "timeout queue", "timeout server", "contimeout".
1260
1261
12622.3) Using ACLs
Willy Tarreau6a06a402007-07-15 20:15:28 +02001263---------------
1264
1265The use of Access Control Lists (ACL) provides a flexible solution to perform
Willy Tarreau0ba27502007-12-24 16:55:16 +01001266content switching and generally to take decisions based on content extracted
1267from the request, the response or any environmental status. The principle is
1268simple :
Willy Tarreau6a06a402007-07-15 20:15:28 +02001269
1270 - define test criteria with sets of values
1271 - perform actions only if a set of tests is valid
1272
1273The actions generally consist in blocking the request, or selecting a backend.
1274
1275In order to define a test, the "acl" keyword is used. The syntax is :
1276
1277 acl <aclname> <criterion> [flags] [operator] <value> ...
1278
Willy Tarreau0ba27502007-12-24 16:55:16 +01001279This creates a new ACL <aclname> or completes an existing one with new tests.
1280Those tests apply to the portion of request/response specified in <criterion>
Willy Tarreau6a06a402007-07-15 20:15:28 +02001281and may be adjusted with optional flags [flags]. Some criteria also support
1282an operator which may be specified before the set of values. The values are
1283of the type supported by the criterion, and are separated by spaces.
1284
Willy Tarreau0ba27502007-12-24 16:55:16 +01001285ACL names must be formed from upper and lower case letters, digits, '-' (dash),
1286'_' (underscore) , '.' (dot) and ':' (colon). ACL names are case-sensitive,
1287which means that "my_acl" and "My_Acl" are two different ACLs.
1288
1289There is no enforced limit to the number of ACLs. The unused ones do not affect
Willy Tarreau6a06a402007-07-15 20:15:28 +02001290performance, they just consume a small amount of memory.
1291
Willy Tarreau0ba27502007-12-24 16:55:16 +01001292The following ACL flags are currently supported :
Willy Tarreau6a06a402007-07-15 20:15:28 +02001293
1294 -i : ignore case during matching.
1295 -- : force end of flags. Useful when a string looks like one of the flags.
1296
1297Supported types of values are :
Willy Tarreau0ba27502007-12-24 16:55:16 +01001298
Willy Tarreau6a06a402007-07-15 20:15:28 +02001299 - integers or integer ranges
1300 - strings
1301 - regular expressions
1302 - IP addresses and networks
1303
1304
Willy Tarreau0ba27502007-12-24 16:55:16 +010013052.3.1) Matching integers
Willy Tarreau6a06a402007-07-15 20:15:28 +02001306------------------------
1307
1308Matching integers is special in that ranges and operators are permitted. Note
1309that integer matching only applies to positive values. A range is a value
1310expressed with a lower and an upper bound separated with a colon, both of which
1311may be omitted.
1312
1313For instance, "1024:65535" is a valid range to represent a range of
1314unprivileged ports, and "1024:" would also work. "0:1023" is a valid
1315representation of privileged ports, and ":1023" would also work.
1316
1317For an easier usage, comparison operators are also supported. Note that using
Willy Tarreau0ba27502007-12-24 16:55:16 +01001318operators with ranges does not make much sense and is strongly discouraged.
1319Similarly, it does not make much sense to perform order comparisons with a set
1320of values.
Willy Tarreau6a06a402007-07-15 20:15:28 +02001321
Willy Tarreau0ba27502007-12-24 16:55:16 +01001322Available operators for integer matching are :
Willy Tarreau6a06a402007-07-15 20:15:28 +02001323
1324 eq : true if the tested value equals at least one value
1325 ge : true if the tested value is greater than or equal to at least one value
1326 gt : true if the tested value is greater than at least one value
1327 le : true if the tested value is less than or equal to at least one value
1328 lt : true if the tested value is less than at least one value
1329
Willy Tarreau0ba27502007-12-24 16:55:16 +01001330For instance, the following ACL matches any negative Content-Length header :
Willy Tarreau6a06a402007-07-15 20:15:28 +02001331
1332 acl negative-length hdr_val(content-length) lt 0
1333
1334
Willy Tarreau0ba27502007-12-24 16:55:16 +010013352.3.2) Matching strings
Willy Tarreau6a06a402007-07-15 20:15:28 +02001336-----------------------
1337
1338String matching applies to verbatim strings as they are passed, with the
1339exception of the backslash ("\") which makes it possible to escape some
1340characters such as the space. If the "-i" flag is passed before the first
1341string, then the matching will be performed ignoring the case. In order
1342to match the string "-i", either set it second, or pass the "--" flag
Willy Tarreau0ba27502007-12-24 16:55:16 +01001343before the first string. Same applies of course to match the string "--".
Willy Tarreau6a06a402007-07-15 20:15:28 +02001344
1345
Willy Tarreau0ba27502007-12-24 16:55:16 +010013462.3.3) Matching regular expressions (regexes)
Willy Tarreau6a06a402007-07-15 20:15:28 +02001347---------------------------------------------
1348
1349Just like with string matching, regex matching applies to verbatim strings as
1350they are passed, with the exception of the backslash ("\") which makes it
1351possible to escape some characters such as the space. If the "-i" flag is
1352passed before the first regex, then the matching will be performed ignoring
1353the case. In order to match the string "-i", either set it second, or pass
Willy Tarreau0ba27502007-12-24 16:55:16 +01001354the "--" flag before the first string. Same principle applies of course to
1355match the string "--".
Willy Tarreau6a06a402007-07-15 20:15:28 +02001356
1357
Willy Tarreau0ba27502007-12-24 16:55:16 +010013582.3.4) Matching IPv4 addresses
1359------------------------------
Willy Tarreau6a06a402007-07-15 20:15:28 +02001360
1361IPv4 addresses values can be specified either as plain addresses or with a
1362netmask appended, in which case the IPv4 address matches whenever it is
1363within the network. Plain addresses may also be replaced with a resolvable
1364host name, but this practise is generally discouraged as it makes it more
Willy Tarreau0ba27502007-12-24 16:55:16 +01001365difficult to read and debug configurations. If hostnames are used, you should
1366at least ensure that they are present in /etc/hosts so that the configuration
1367does not depend on any random DNS match at the moment the configuration is
1368parsed.
Willy Tarreau6a06a402007-07-15 20:15:28 +02001369
1370
Willy Tarreau0ba27502007-12-24 16:55:16 +010013712.3.5) Available matching criteria
Willy Tarreau6a06a402007-07-15 20:15:28 +02001372----------------------------------
1373
Willy Tarreau0ba27502007-12-24 16:55:16 +010013742.3.5.1) Matching at Layer 4 and below
1375--------------------------------------
1376
1377A first set of criteria applies to information which does not require any
1378analysis of the request or response contents. Those generally include TCP/IP
1379addresses and ports, as well as internal values independant on the stream.
1380
Willy Tarreau6a06a402007-07-15 20:15:28 +02001381always_false
1382 This one never matches. All values and flags are ignored. It may be used as
1383 a temporary replacement for another one when adjusting configurations.
1384
1385always_true
1386 This one always matches. All values and flags are ignored. It may be used as
1387 a temporary replacement for another one when adjusting configurations.
1388
1389src <ip_address>
Willy Tarreau0ba27502007-12-24 16:55:16 +01001390 Applies to the client's IPv4 address. It is usually used to limit access to
Willy Tarreau6a06a402007-07-15 20:15:28 +02001391 certain resources such as statistics. Note that it is the TCP-level source
1392 address which is used, and not the address of a client behind a proxy.
1393
1394src_port <integer>
1395 Applies to the client's TCP source port. This has a very limited usage.
1396
1397dst <ip_address>
Willy Tarreau0ba27502007-12-24 16:55:16 +01001398 Applies to the local IPv4 address the client connected to. It can be used to
Willy Tarreau6a06a402007-07-15 20:15:28 +02001399 switch to a different backend for some alternative addresses.
1400
1401dst_port <integer>
1402 Applies to the local port the client connected to. It can be used to switch
1403 to a different backend for some alternative ports.
1404
1405dst_conn <integer>
1406 Applies to the number of currently established connections on the frontend,
1407 including the one being evaluated. It can be used to either return a sorry
Willy Tarreau0ba27502007-12-24 16:55:16 +01001408 page before hard-blocking, or to use a specific backend to drain new requests
Willy Tarreau6a06a402007-07-15 20:15:28 +02001409 when the farm is considered saturated.
1410
Willy Tarreau0ba27502007-12-24 16:55:16 +01001411nbsrv <integer>
1412nbsrv(backend) <integer>
1413 Returns true when the number of usable servers of either the current backend
1414 or the named backend matches the values or ranges specified. This is used to
1415 switch to an alternate backend when the number of servers is too low to
1416 to handle some load. It is useful to report a failure when combined with
1417 "monitor fail".
1418
1419
14202.3.5.2) Matching at Layer 7
1421----------------------------
1422
1423A second set of criteria applies to information which can be found at the
1424application layer (layer 7). Those require that a full HTTP request has been
1425read, and are only evaluated then. They may require slightly more CPU resources
1426than the layer 4 ones, but not much since the request and response are indexed.
1427
Willy Tarreau6a06a402007-07-15 20:15:28 +02001428method <string>
1429 Applies to the method in the HTTP request, eg: "GET". Some predefined ACL
1430 already check for most common methods.
1431
1432req_ver <string>
1433 Applies to the version string in the HTTP request, eg: "1.0". Some predefined
1434 ACL already check for versions 1.0 and 1.1.
1435
1436path <string>
1437 Returns true when the path part of the request, which starts at the first
1438 slash and ends before the question mark, equals one of the strings. It may be
1439 used to match known files, such as /favicon.ico.
1440
1441path_beg <string>
Willy Tarreau0ba27502007-12-24 16:55:16 +01001442 Returns true when the path begins with one of the strings. This can be used
1443 to send certain directory names to alternative backends.
Willy Tarreau6a06a402007-07-15 20:15:28 +02001444
1445path_end <string>
1446 Returns true when the path ends with one of the strings. This may be used to
1447 control file name extension.
1448
1449path_sub <string>
1450 Returns true when the path contains one of the strings. It can be used to
1451 detect particular patterns in paths, such as "../" for example. See also
1452 "path_dir".
1453
1454path_dir <string>
1455 Returns true when one of the strings is found isolated or delimited with
1456 slashes in the path. This is used to perform filename or directory name
1457 matching without the risk of wrong match due to colliding prefixes. See also
1458 "url_dir" and "path_sub".
1459
1460path_dom <string>
1461 Returns true when one of the strings is found isolated or delimited with dots
1462 in the path. This may be used to perform domain name matching in proxy
1463 requests. See also "path_sub" and "url_dom".
1464
1465path_reg <regex>
1466 Returns true when the path matches one of the regular expressions. It can be
1467 used any time, but it is important to remember that regex matching is slower
1468 than other methods. See also "url_reg" and all "path_" criteria.
1469
1470url <string>
1471 Applies to the whole URL passed in the request. The only real use is to match
1472 "*", for which there already is a predefined ACL.
1473
1474url_beg <string>
1475 Returns true when the URL begins with one of the strings. This can be used to
1476 check whether a URL begins with a slash or with a protocol scheme.
1477
1478url_end <string>
1479 Returns true when the URL ends with one of the strings. It has very limited
1480 use. "path_end" should be used instead for filename matching.
1481
1482url_sub <string>
1483 Returns true when the URL contains one of the strings. It can be used to
1484 detect particular patterns in query strings for example. See also "path_sub".
1485
1486url_dir <string>
1487 Returns true when one of the strings is found isolated or delimited with
1488 slashes in the URL. This is used to perform filename or directory name
1489 matching without the risk of wrong match due to colliding prefixes. See also
1490 "path_dir" and "url_sub".
1491
1492url_dom <string>
1493 Returns true when one of the strings is found isolated or delimited with dots
1494 in the URL. This is used to perform domain name matching without the risk of
1495 wrong match due to colliding prefixes. See also "url_sub".
1496
1497url_reg <regex>
1498 Returns true when the URL matches one of the regular expressions. It can be
1499 used any time, but it is important to remember that regex matching is slower
1500 than other methods. See also "path_reg" and all "url_" criteria.
1501
Alexandre Cassen5eb1a902007-11-29 15:43:32 +01001502url_ip <ip_address>
Willy Tarreau0ba27502007-12-24 16:55:16 +01001503 Applies to the IP address specified in the absolute URI in an HTTP request.
1504 It can be used to prevent access to certain resources such as local network.
1505 It is useful with option 'http_proxy'.
Alexandre Cassen5eb1a902007-11-29 15:43:32 +01001506
1507url_port <integer>
Willy Tarreau0ba27502007-12-24 16:55:16 +01001508 Applies to the port specified in the absolute URI in an HTTP request. It can
1509 be used to prevent access to certain resources. It is useful with option
1510 'http_proxy'. Note that if the port is not specified in the request, port 80
1511 is assumed.
Alexandre Cassen5eb1a902007-11-29 15:43:32 +01001512
Willy Tarreau6a06a402007-07-15 20:15:28 +02001513hdr <string>
1514hdr(header) <string>
1515 Note: all the "hdr*" matching criteria either apply to all headers, or to a
1516 particular header whose name is passed between parenthesis and without any
Willy Tarreau0ba27502007-12-24 16:55:16 +01001517 space. The header name is not case-sensitive. The header matching complies
1518 with RFC2616, and treats as separate headers all values delimited by commas.
Willy Tarreau6a06a402007-07-15 20:15:28 +02001519
1520 The "hdr" criteria returns true if any of the headers matching the criteria
Willy Tarreau0ba27502007-12-24 16:55:16 +01001521 match any of the strings. This can be used to check exact for values. For
Willy Tarreau6a06a402007-07-15 20:15:28 +02001522 instance, checking that "connection: close" is set :
1523
1524 hdr(Connection) -i close
1525
1526hdr_beg <string>
1527hdr_beg(header) <string>
1528 Returns true when one of the headers begins with one of the strings. See
1529 "hdr" for more information on header matching.
1530
1531hdr_end <string>
1532hdr_end(header) <string>
1533 Returns true when one of the headers ends with one of the strings. See "hdr"
1534 for more information on header matching.
1535
1536hdr_sub <string>
1537hdr_sub(header) <string>
1538 Returns true when one of the headers contains one of the strings. See "hdr"
1539 for more information on header matching.
1540
1541hdr_dir <string>
1542hdr_dir(header) <string>
1543 Returns true when one of the headers contains one of the strings either
1544 isolated or delimited by slashes. This is used to perform filename or
1545 directory name matching, and may be used with Referer. See "hdr" for more
1546 information on header matching.
1547
1548hdr_dom <string>
1549hdr_dom(header) <string>
1550 Returns true when one of the headers contains one of the strings either
1551 isolated or delimited by dots. This is used to perform domain name matching,
1552 and may be used with the Host header. See "hdr" for more information on
1553 header matching.
1554
1555hdr_reg <regex>
1556hdr_reg(header) <regex>
1557 Returns true when one of the headers matches of the regular expressions. It
1558 can be used at any time, but it is important to remember that regex matching
1559 is slower than other methods. See also other "hdr_" criteria, as well as
1560 "hdr" for more information on header matching.
1561
1562hdr_val <integer>
1563hdr_val(header) <integer>
1564 Returns true when one of the headers starts with a number which matches the
1565 values or ranges specified. This may be used to limit content-length to
1566 acceptable values for example. See "hdr" for more information on header
1567 matching.
1568
1569hdr_cnt <integer>
1570hdr_cnt(header) <integer>
Willy Tarreau0ba27502007-12-24 16:55:16 +01001571 Returns true when the number of occurrence of the specified header matches
1572 the values or ranges specified. It is important to remember that one header
1573 line may count as several headers if it has several values. This is used to
1574 detect presence, absence or abuse of a specific header, as well as to block
1575 request smugling attacks by rejecting requests which contain more than one
1576 of certain headers. See "hdr" for more information on header matching.
Willy Tarreau6a06a402007-07-15 20:15:28 +02001577
1578
Willy Tarreau0ba27502007-12-24 16:55:16 +010015792.3.6) Pre-defined ACLs
Willy Tarreau6a06a402007-07-15 20:15:28 +02001580-----------------------
1581
1582Some predefined ACLs are hard-coded so that they do not have to be declared in
1583every frontend which needs them. They all have their names in upper case in
Willy Tarreau0ba27502007-12-24 16:55:16 +01001584order to avoid confusion. Their equivalence is provided below. Please note that
1585only the first three ones are not layer 7 based.
Willy Tarreau6a06a402007-07-15 20:15:28 +02001586
1587ACL name Equivalent to Usage
1588---------------+-----------------------------+---------------------------------
1589TRUE always_true 1 always match
1590FALSE always_false 0 never match
1591LOCALHOST src 127.0.0.1/8 match connection from local host
1592HTTP_1.0 req_ver 1.0 match HTTP version 1.0
1593HTTP_1.1 req_ver 1.1 match HTTP version 1.1
1594METH_CONNECT method CONNECT match HTTP CONNECT method
1595METH_GET method GET HEAD match HTTP GET or HEAD method
1596METH_HEAD method HEAD match HTTP HEAD method
1597METH_OPTIONS method OPTIONS match HTTP OPTIONS method
1598METH_POST method POST match HTTP POST method
1599METH_TRACE method TRACE match HTTP TRACE method
1600HTTP_URL_ABS url_reg ^[^/:]*:// match absolute URL with scheme
1601HTTP_URL_SLASH url_beg / match URL begining with "/"
1602HTTP_URL_STAR url * match URL equal to "*"
1603HTTP_CONTENT hdr_val(content-length) gt 0 match an existing content-length
1604---------------+-----------------------------+---------------------------------
1605
1606
Willy Tarreau0ba27502007-12-24 16:55:16 +010016072.3.7) Using ACLs to form conditions
Willy Tarreau6a06a402007-07-15 20:15:28 +02001608------------------------------------
1609
1610Some actions are only performed upon a valid condition. A condition is a
1611combination of ACLs with operators. 3 operators are supported :
1612
1613 - AND (implicit)
1614 - OR (explicit with the "or" keyword or the "||" operator)
1615 - Negation with the exclamation mark ("!")
1616
1617A condition is formed as a disjonctive form :
1618
1619 [!]acl1 [!]acl2 ... [!]acln { or [!]acl1 [!]acl2 ... [!]acln } ...
1620
1621Such conditions are generally used after an "if" or "unless" statement,
1622indicating when the condition will trigger the action.
1623
1624For instance, to block HTTP requests to the "*" URL with methods other than
Willy Tarreau0ba27502007-12-24 16:55:16 +01001625"OPTIONS", as well as POST requests without content-length, and GET or HEAD
1626requests with a content-length greater than 0, and finally every request which
1627is not either GET/HEAD/POST/OPTIONS !
Willy Tarreau6a06a402007-07-15 20:15:28 +02001628
1629 acl missing_cl hdr_cnt(Content-length) eq 0
1630 block if HTTP_URL_STAR !METH_OPTIONS || METH_POST missing_cl
1631 block if METH_GET HTTP_CONTENT
1632 block unless METH_GET or METH_POST or METH_OPTIONS
1633
1634To select a different backend for requests to static contents on the "www" site
1635and to every request on the "img", "video", "download" and "ftp" hosts :
1636
1637 acl url_static path_beg /static /images /img /css
1638 acl url_static path_end .gif .png .jpg .css .js
1639 acl host_www hdr_beg(host) -i www
1640 acl host_static hdr_beg(host) -i img. video. download. ftp.
1641
1642 # now use backend "static" for all static-only hosts, and for static urls
1643 # of host "www". Use backend "www" for the rest.
1644 use_backend static if host_static or host_www url_static
1645 use_backend www if host_www
1646
1647See below for the detailed help on the "block" and "use_backend" keywords.
Willy Tarreaudbc36f62007-11-30 12:29:11 +01001648
1649
Willy Tarreauc7246fc2007-12-02 17:31:20 +010016502.4) Server options
Willy Tarreau5764b382007-11-30 17:46:49 +01001651-------------------
1652
1653slowstart <start_time_in_ms>
1654 The 'slowstart' parameter for a server accepts a value in milliseconds which
1655 indicates after how long a server which has just come back up will run at
Willy Tarreaubefdff12007-12-02 22:27:38 +01001656 full speed. Just as with every other time-based parameter, it can be entered
1657 in any other explicit unit among { us, ms, s, m, h, d }. The speed grows
1658 linearly from 0 to 100% during this time. The limitation applies to two
1659 parameters :
Willy Tarreau5764b382007-11-30 17:46:49 +01001660
1661 - maxconn: the number of connections accepted by the server will grow from 1
1662 to 100% of the usual dynamic limit defined by (minconn,maxconn,fullconn).
1663
1664 - weight: when the backend uses a dynamic weighted algorithm, the weight
1665 grows linearly from 1 to 100%. In this case, the weight is updated at every
1666 health-check. For this reason, it is important that the 'inter' parameter
Willy Tarreau0ba27502007-12-24 16:55:16 +01001667 is smaller than the 'slowstart', in order to maximize the number of steps.
Willy Tarreau5764b382007-11-30 17:46:49 +01001668
1669 The slowstart never applies when haproxy starts, otherwise it would cause
1670 trouble to running servers. It only applies when a server has been previously
1671 seen as failed.
1672
1673
Willy Tarreau0ba27502007-12-24 16:55:16 +01001674/*
1675 * Local variables:
1676 * fill-column: 79
1677 * End:
1678 */