~ubuntu-branches/ubuntu/intrepid/haproxy/intrepid

« back to all changes in this revision

Viewing changes to doc/haproxy.1

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2008-03-09 21:30:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080309213029-8oupnrc607mg5uqw
Tags: 1.3.14.3-1
* New Upstream Version
* Add status argument support to init-script to conform to LSB.
* Cleanup pidfile after stop in init script. Init script return code fixups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH HAPROXY 1 "17 August 2007" 
 
2
 
 
3
.SH NAME
 
4
 
 
5
HAProxy \- fast and reliable http reverse proxy and load balancer
 
6
 
 
7
.SH SYNOPSIS
 
8
 
 
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...] 
 
10
 
 
11
.SH DESCRIPTION
 
12
 
 
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
 
20
   monitoring ;
 
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
 
25
   application cookies
 
26
 \- report detailed status as HTML pages to authenticated users from an
 
27
   URI intercepted from the application.
 
28
 
 
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.
 
32
 
 
33
.SH OPTIONS
 
34
 
 
35
.TP
 
36
\fB-f <configuration file>\fP
 
37
Specify configuration file path.
 
38
 
 
39
.TP
 
40
\fB-n <maxconn>\fP
 
41
Set the high limit for the total number of simultaneous connections.
 
42
 
 
43
.TP
 
44
\fB-N <maxconn>\fP
 
45
Set the high limit for the per-listener number of simultaneous connections.
 
46
 
 
47
.TP
 
48
\fB-d\fP
 
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
 
53
starting up.
 
54
 
 
55
.TP
 
56
\fB-D\fP
 
57
Start in daemon mode.
 
58
 
 
59
.TP
 
60
\fB-q\fP
 
61
Disable messages on output.
 
62
 
 
63
.TP
 
64
\fB-V\fP
 
65
Displays messages on output even when -q or 'quiet' are specified. Some
 
66
information about pollers and config file are displayed during startup.
 
67
 
 
68
.TP
 
69
\fB-c\fP
 
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.
 
72
 
 
73
.TP
 
74
\fB-p <pidfile>\fP
 
75
Ask the process to write down each of its children's pids to this file
 
76
in daemon mode.
 
77
 
 
78
.TP
 
79
\fB-s\fP
 
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.
 
83
 
 
84
.TP
 
85
\fB-l\fP
 
86
Show even more statistics (implies '-s').
 
87
 
 
88
.TP
 
89
\fB-dk\fP
 
90
Disable use of kqueue(). kqueue() is available only on BSD systems.
 
91
 
 
92
.TP
 
93
\fB-ds\fP
 
94
Disable use of speculative epoll(). epoll() is available only on Linux 2.6
 
95
and some custom Linux 2.4 systems.
 
96
 
 
97
.TP
 
98
\fB-de\fP
 
99
Disable use of epoll(). epoll() is available only on Linux 2.6
 
100
and some custom Linux 2.4 systems.
 
101
 
 
102
.TP
 
103
\fB-dp\fP
 
104
Disables use of poll(). select() might be used instead.
 
105
 
 
106
.TP
 
107
\fB-db\fP
 
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
 
112
run full debug.
 
113
 
 
114
.TP
 
115
\fB-m <megs>\fP
 
116
Enforce a memory usage limit to a maximum of <megs> megabytes.
 
117
 
 
118
.TP
 
119
\fB-sf <pidlist>\fP
 
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.
 
124
 
 
125
.TP
 
126
\fB-st <pidlist>\fP
 
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.
 
131
 
 
132
.SH LOGGING
 
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.
 
140
 
 
141
.SH SIGNALS
 
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.
 
143
.TP
 
144
- \fBSIGUSR1\fP
 
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.
 
146
.TP
 
147
- \fBSIGTTOU\fP
 
148
Tells the daemon to stop listening to all sockets. Used internally by \fB-sf\fP and \fB-st\fP.
 
149
.TP
 
150
- \fBSIGTTIN\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.
 
152
.TP
 
153
- \fBSIGINT\fP and \fBSIGTERM\fP
 
154
Both signals can be used to quickly stop the daemon.
 
155
.TP
 
156
- \fBSIGHUP\fP
 
157
Dumps the status of all proxies and servers into the logs. Mostly used for trouble-shooting purposes.
 
158
.TP
 
159
\-\ \fBSIGQUIT\fP
 
160
Dumps information about memory pools into the logs. Mostly used for debugging purposes.
 
161
.TP
 
162
\-\ \fBSIGPIPE\fP
 
163
This signal is intercepted and ignored on systems without \fBMSG_NOSIGNAL\fP.
 
164
 
 
165
.SH SEE ALSO
 
166
 
 
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.
 
170
 
 
171
.SH AUTHOR
 
172
 
 
173
HAProxy was written by Willy Tarreau. This man page was written by Arnaud Cornet and Willy Tarreau.
 
174