1
.TH HAPROXY 1 "17 August 2007"
5
HAProxy \- fast and reliable http reverse proxy and load balancer
9
haproxy -f <configuration\ file> [-n\ maxconn] [-N\ maxconn] [-d] [-D] [-q] [-V] [-c] [-p\ <pidfile>] [-s] [-l] [-dk] [-ds] [-de] [-dp] [-db] [-m\ <megs>] [{-sf|-st}\ pidlist...]
13
HAProxy is a TCP/HTTP reverse proxy which is particularly suited for
14
high availability environments. Indeed, it can:
15
\- route HTTP requests depending on statically assigned cookies ;
16
\- spread the load among several servers while assuring server
17
persistence through the use of HTTP cookies ;
18
\- switch to backup servers in the event a main one fails ;
19
\- accept connections to special ports dedicated to service
21
\- stop accepting connections without breaking existing ones ;
22
\- add/modify/delete HTTP headers both ways ;
23
\- block requests matching a particular pattern ;
24
\- hold clients to the right application server depending on
26
\- report detailed status as HTML pages to authenticated users from an
27
URI intercepted from the application.
29
It needs very little resource. Its event-driven architecture allows it
30
to easily handle thousands of simultaneous connections on hundreds of
31
instances without risking the system's stability.
36
\fB-f <configuration file>\fP
37
Specify configuration file path.
41
Set the high limit for the total number of simultaneous connections.
45
Set the high limit for the per-listener number of simultaneous connections.
49
Start in foregreound with debugging mode enabled.
50
When the proxy runs in this mode, it dumps every connections,
51
disconnections, timestamps, and HTTP headers to stdout. This should
52
NEVER be used in an init script since it will prevent the system from
61
Disable messages on output.
65
Displays messages on output even when -q or 'quiet' are specified. Some
66
information about pollers and config file are displayed during startup.
70
Only checks config file and exits with code 0 if no error was found, or
71
exits with code 1 if a syntax error was found.
75
Ask the process to write down each of its children's pids to this file
80
Show statistics (only if compiled in).
81
Statistics are only available if compiled in with the 'STATTIME' option.
82
It's only used during code optimization phases, and will soon disappear.
86
Show even more statistics (implies '-s').
90
Disable use of kqueue(). kqueue() is available only on BSD systems.
94
Disable use of speculative epoll(). epoll() is available only on Linux 2.6
95
and some custom Linux 2.4 systems.
99
Disable use of epoll(). epoll() is available only on Linux 2.6
100
and some custom Linux 2.4 systems.
104
Disables use of poll(). select() might be used instead.
108
Disables background mode (stays in foreground, useful for debugging).
109
For debugging, the '-db' option is very useful as it temporarily
110
disables daemon mode and multi-process mode. The service can then be
111
stopped by simply pressing Ctrl-C, without having to edit the config nor
116
Enforce a memory usage limit to a maximum of <megs> megabytes.
120
Send FINISH signal to the pids in pidlist after startup. The processes
121
which receive this signal will wait for all sessions to finish before
122
exiting. This option must be specified last, followed by any number of
123
PIDs. Technically speaking, \fBSIGTTOU\fP and \fBSIGUSR1\fP are sent.
127
Send TERMINATE signal to the pids in pidlist after startup. The processes
128
which receive this signal will wait immediately terminate, closing all
129
active sessions. This option must be specified last, followed by any number
130
of PIDs. Technically speaking, \fBSIGTTOU\fP and \fBSIGTERM\fP are sent.
133
Since HAProxy can run inside a chroot, it cannot reliably access /dev/log.
134
For this reason, it uses the UDP protocol to send its logs to the server,
135
even if it is the local server. People who experience trouble receiving
136
logs should ensure that their syslog daemon listens to the UDP socket.
137
Several Linux distributions which ship with syslogd from the sysklogd
138
package have UDP disabled by default. The \fB-r\fP option must be passed
139
to the daemon in order to enable UDP.
142
Some signals have a special meaning for the haproxy daemon. Generally, they are used between daemons and need not be used by the administrator.
145
Tells the daemon to stop all proxies and exit once all sessions are closed. It is often referred to as the "soft-stop" signal.
148
Tells the daemon to stop listening to all sockets. Used internally by \fB-sf\fP and \fB-st\fP.
151
Tells the daemon to restart listening to all sockets after a \fBSIGTTOU\fP. Used internally when there was a problem during hot reconfiguration.
153
- \fBSIGINT\fP and \fBSIGTERM\fP
154
Both signals can be used to quickly stop the daemon.
157
Dumps the status of all proxies and servers into the logs. Mostly used for trouble-shooting purposes.
160
Dumps information about memory pools into the logs. Mostly used for debugging purposes.
163
This signal is intercepted and ignored on systems without \fBMSG_NOSIGNAL\fP.
167
A much better documentation can be found in haproxy-en.txt. On debian
168
systems, you can find this file in
169
/usr/share/doc/haproxy/haproxy-en.txt.gz.
173
HAProxy was written by Willy Tarreau. This man page was written by Arnaud Cornet and Willy Tarreau.