Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 499 lines (498 sloc) 15.461 kB
e1f252f Update the manpage
Marcus Holland-Moritz authored
1 .TH balance.fm "1" "2012-02-13" "balance.fm 1.0.0"
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
2 .SH NAME
e1f252f Update the manpage
Marcus Holland-Moritz authored
3 balance.fm \- Simple TCP proxy with load balancing, failover and monitoring mechanisms
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
4 .SH SYNOPSIS
e1f252f Update the manpage
Marcus Holland-Moritz authored
5 .na
6 .TP
7 .B balance.fm
8 .RB "[\|" "\-b "\c
9 .I addr\c
10 \&\|]
11 .RB "[\|" "\-B "\c
12 .I addr\c
13 \&\|]
14 .RB "[\|" "\-m "\c
15 .I spec\c
16 \&\|]
17 .RB "[\|" "\-t "\c
18 .I sec\c
19 \&\|]
20 .RB "[\|" "\-T "\c
21 .I sec\c
22 \&\|]
23 .RB "[\|" "\-k "\c
24 .I t,i,p\c
25 \&\|]
26 .RB "[\|" "\-K "\c
27 .I t,i,p\c
28 \&\|]
29 .RB "[\|" \-adfpHM6 "\|]"
30 .I port
31 .I host1\c
32 [:\c
33 .I port1\c
34 [:\c
35 .I maxc\c
36 ]] [!|%] [ ... \c
37 .I hostn\c
38 [:\c
39 .I portn\c
40 [:\c
41 .I maxc\c
42 ]]]
43 .PP
44 .B balance.fm
45 .RB "[\|" "\-b "\c
46 .I addr\c
47 \&\|]
48 .B \-i
49 .RB "[\|" \-d "\|]"
50 .RB "[\|" \-M "\|]"
51 .I port
52 .PP
53 .B balance.fm
54 .RB "[\|" "\-b "\c
55 .I addr\c
56 \&\|]
57 .B -c \c
58 .I cmd
59 .RB "[\|" \-d "\|]"
60 .RB "[\|" \-M "\|]"
61 .I port
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
62 .SH DESCRIPTION
e1f252f Update the manpage
Marcus Holland-Moritz authored
63 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
64 is a simple, generic "userland" TCP proxy, which allows simple
e1f252f Update the manpage
Marcus Holland-Moritz authored
65 round-robin load balancing, graceful failover between and monitoring
66 of several destination servers.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
67 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
68 .I balance.fm
69 supports IPv6 on the listening side which makes it a very useful tool
70 for IPv6 migration of IPv4 only services and servers.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
71 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
72 .I balance.fm
2571350 Transfer repository to lastfm organization
Marcus Holland-Moritz authored
73 is available at: https://github.com/lastfm/balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
74 .PP
75 .I Definitions:
e1f252f Update the manpage
Marcus Holland-Moritz authored
76 A possible destination consisting of a host address and a port is
77 called a \fBchannel\fR.
78 A channel is member of a \fBchannel group\fR. Channels are numbered
79 in a group starting with 0. Groups are numbered starting with 0,
80 which is the initial default group.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
81 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
82 Channels can be in one of the following states:
83 .TP
84 .B enabled
85 The channel is available for load balancing and all monitoring checks
86 are currently passing.
87 .TP
88 .B soft-disabled
89 The channel has been disabled either by the autodisable option or by
90 a failing monitoring check. It can, however, be automatically re-enabled
91 if monitoring is configured to do so and checks start to pass again.
92 .TP
93 .B hard-disabled
94 The channel has been disabled manually through the interactive shell.
95 Hard-disabled channels are not considered for re-enabling by monitoring
96 and must be re-enabled manually.
97 .PP
98 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
99 accepts connections on the given port and forwards them to the supplied channels.
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
100 At least one channel (in the default group) must be specified.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
101 If there are two or more channels specified in a group
e1f252f Update the manpage
Marcus Holland-Moritz authored
102 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
103 performs a simple round-robin load balancing between the channels.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
104 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
105 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
106 allows the definition of further channel groups. The connection scheme works as
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
107 follows:
e1f252f Update the manpage
Marcus Holland-Moritz authored
108 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
109 tries first to establish a connection to a channel in the first group (0), performing
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
110 the standard round-robin load balancing scheme. If no channel in this group is available,
e1f252f Update the manpage
Marcus Holland-Moritz authored
111 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
112 proceeds with the next higher channel group. Groups are simply
113 separated with a "!" at the command line at startup and can be controlled
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
114 interactively with the "group" command.
115 .PP
116 A "%" instead of a "!" as a group separator declares the previous group to be of type "hash".
117 This means that instead of a round-robin algorithm, a hash distribution based on the
118 client ip address is used to determine the destination channel. This allows connecting
119 one client always to the same server (e.g. balancing http sessions to a single server).
120 .PP
121 Hosts may be specified either by hostname or by IP address. Ports may
122 be specified either by name (as listed in /etc/services) or numerically.
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
123 If no port is specified in a destination, the destination port
124 defaults to the source port that
e1f252f Update the manpage
Marcus Holland-Moritz authored
125 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
126 controls.
127 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
128 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
129 allows the specification of the maximum number of connections per channel. This
130 parameter can be optionally added after the port specification separated by a
131 colon (":"). If a maximum number of connections is specified a channel will
132 only be used for this maximum number of simultaneous connections. A maxc value of 0
133 denotes an unlimited number of connections. This is the initial default value
134 of a channel.
135 .PP
136 The maximum number of groups and channels
e1f252f Update the manpage
Marcus Holland-Moritz authored
137 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
138 can handle is specified at compile time and is initially 16 channels in 16 groups.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
139 .PP
140 Failover to another destination (a "channel") occurs if the connection is
141 refused on the current channel or if the connect timeout is reached trying
142 to establish a connection. If all possible destinations (channels) currently fail,
e1f252f Update the manpage
Marcus Holland-Moritz authored
143 the client connection to
144 .I balance.fm
145 is closed.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
146 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
147 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
148 accepts the following options:
149 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
150 .B \-6
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
151 Forces to bind on IPv6 socket by setting hints.ai_family to AF_INET6.
152 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
153 .B \-a
154 Enable autodisable option: soft-disable a channel if a connect fails
155 during normal load-balancing. This is independent from monitoring.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
156 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
157 .B \-b \fIaddr
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
158 Bindhost:
e1f252f Update the manpage
Marcus Holland-Moritz authored
159 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
160 binds to the specified host (or address) for listen() instead to INADDR_ANY.
161 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
162 .B \-B \fIaddr
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
163 Bindhost:
e1f252f Update the manpage
Marcus Holland-Moritz authored
164 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
165 binds to the specified host (or address) for outgoing connections (the
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
166 connection will be initiated from this address).
167 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
168 .B \-c \fIcmd
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
169 Command:
e1f252f Update the manpage
Marcus Holland-Moritz authored
170 allows to send a command to the
171 .I balance.fm
172 master process (see
173 .sm
174 .B "INTERACTIVE CONTROL"
175 below).
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
176 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
177 .B \-d
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
178 Debug:
e1f252f Update the manpage
Marcus Holland-Moritz authored
179 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
180 outputs debugging and tracing information messages on stderr.
181 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
182 .B \-H
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
183 Hashfailover:
e1f252f Update the manpage
Marcus Holland-Moritz authored
184 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
185 does failover to next node even if hash is used.
186 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
187 .B \-f
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
188 Foreground:
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
189 tells
e1f252f Update the manpage
Marcus Holland-Moritz authored
190 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
191 to stay in foreground. This might be useful for
192 testing and debugging since
e1f252f Update the manpage
Marcus Holland-Moritz authored
193 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
194 can be stopped in that mode using ^C (or other interrupt character).
195 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
196 .B \-m \fIspec
197 Monitoring specification: see
198 .sm
199 .B MONITORING
200 below.
201 .TP
202 .B \-M
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
203 Use memory mapping for IPC instead of shared memory
204 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
205 .B \-i
206 Interactive Control: see
207 .sm
208 .B "INTERACTIVE CONTROL"
209 below.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
210 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
211 .B \-p
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
212 Packetdump:
e1f252f Update the manpage
Marcus Holland-Moritz authored
213 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
214 shows all incoming and outgoing data on stdout using a
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
215 simple always readable external representation of data.
216 This might be useful for debugging and protocol analysis.
217 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
218 .B \-t \fIsec
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
219 Connect Timeout:
220 the default timeout trying to establish a connection to any destination
221 can be changed using this option. The default timeout after which a
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
222 destination is regarded to be currently inaccessible is 5 seconds.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
223 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
224 .B \-T \fIsec
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
225 Select Timeout:
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
226 Timeout for select(), default = 0 (never). This feature is currently
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
227 untested.
128b899 Add TCP keepalive configuration support
Marcus Holland-Moritz authored
228 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
229 .BR \-k "/" "\-K " \fIt\fR,\fIi\fR,\fIp
128b899 Add TCP keepalive configuration support
Marcus Holland-Moritz authored
230 Client/Server TCP Keepalive:
231 Configure idle time (seconds), interval (seconds) and number of probes
232 for TCP keepalive.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
233 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
234 .SH "INTERACTIVE CONTROL"
235 .I balance.fm
236 connects to the running instance defined by local port and bind address via
237 shared memory and allows to control the behaviour of it using a
238 command line interface. The access permission using this interface are
239 determined by the access restrictions of the shared memory segment in effect.
240 .TP
241 .BR help " or " "?"
242 prints out a short command overview.
243 .TP
244 .B assign \fIchannel\fR \fIhost\fR \fIport
245 allows to change the host_port assignment of a channel (only if hard-disabled).
246 .TP
247 .B create \fIhost\fR \fIport
248 allows to establish a new destination definition (channel) consisting of
249 host and port in the current group.
250 .TP
251 .B disable \fIchannel
252 hard-disables a channel in the current group.
253 .TP
254 .B enable \fIchannel
255 enables a channel again in the current group.
256 .TP
257 .B group \fIgroup
258 changes the current group in interactive mode where all following commands
259 are targeted.
260 .TP
261 .B hash
262 changes the current group to be of type "Hash".
263 .TP
264 .B help
265 prints out online help informations.
266 .TP
267 .B kill
268 shuts down the master process and exits interactive mode.
269 .TP
270 .B maxc \fIchannel\fR \fImaxc
271 sets the maximum number of connection ot the channel (0 means infinite).
272 .TP
273 .B monitor \fR[\|\fBenable\fR|\fBdisable\fR|\fBshow\fR\|]
274 if a monitor process is running, enable or disable monitoring or show the current
275 monitoring state.
276 .TP
277 .B mrtg-bytes \fIgroup\fR \fIchannel
278 prints out the bytes received/sent in MRTG compatible format (intended to be called
279 with -c automatically by MRTG).
280 .TP
281 .B mrtg-conns \fIgroup\fR \fIchannel
282 prints out the total connections in MRTG compatible format (intended to be called
283 with -c automatically by MRTG).
284 .TP
285 .B quit
286 exits the interactive mode.
287 .TP
288 .B reset \fIchannel
289 resets the byte counters of a channel.
290 .TP
291 .B rr
292 changes the current group to be of type "Round Robin".
293 .TP
294 .B show
295 shows an overview and the status of all channels including the incoming and
296 outgoing transfer volume in bytes. The output is sorted by groups. Additionally
297 the current connections (c) and the maximum allowed connections (maxc) are printed.
298 .TP
299 .B version
300 prints out the version and MAXGROUPS and MAXCHANNELS constants at compile time.
301 .SH MONITORING
302 .I balance.fm
303 provides optional channel monitoring support. This can be used to disable
304 degraded channels as well as to re-enable channels when they are working
305 again. The advantage over using the autodisable functionality, apart from
306 the fact that channels can be re-enabled, is that monitoring works in the
307 background and can detect a degraded channel before the master process
308 attempts to connect (and potentially fail). Furthermore, instead of a
309 simple connection test, monitoring optionally allows you to run a custom
310 binary or script to check the status of a channel and then use its exit
311 codes to enable or disable a channel.
312 .PP
313 The basic syntax for configuring monitoring is actually quite simple, but
314 it does have a couple of constraints:
315 .PP
316 .RS
317 .nf
318 \fIspec\fR := \fIkvpair\fR
319 | \fIspec\fR \fB":"\fR \fIkvpair
320 \fIkvpair\fR := \fIkey\fR
321 | \fIkey\fR \fB"="\fR \fIvalue
322 .fi
323 .RE
324 .PP
325 There are two different types of \fIkvpair\fRs:
326 .TP
327 .B Actions
328 define monitoring actions, e.g. attempting to connect to a host.
329 .TP
330 .B Options
331 can be used to configure monitoring properties. There are global
332 options and action specific options. Action specific options need
333 to appear after the action they shall refer to. Global options can
334 appear anywhere in the specification.
335 .PP
336 The following actions and their respective options are defined:
337 .TP
338 .B connect
339 Attempt to connect to the channel. This is the most basic monitoring
340 check and should usually performed simply because it is executed for
341 all channels in parallel. Due to the short-circuiting nature of a
342 chain of monitoring commands, channels that fail the connect check
343 will not cause any other checks to run for that channel. This action
344 supports the following options:
345 .RS
346 .TP
347 .BR timeout = \fIfloat
348 The connect timeout in seconds as a floating point constant.
349 This defaults to the connect timeout given using \fB-t\fR.
350 .RE
351 .PP
352 .TP
353 .BR command = \fIstring
354 This is the most flexible monitoring check as you are basically
355 free to implement whatever check you like as an external script
356 or binary program. You should be able to use most existing
357 programs as well, as long as they signal pass or fail for the
358 check through their exit code. If the command line string for
359 the program requires the use of colons (which are normally used
360 to separate \fIkvpair\fRs) you can escape them with a backslash
361 character. Within the command line string, you can use the
362 following placeholder values:
363 .RS
364 .TP
365 .B %H
366 The IP address of the channel.
367 .TP
368 .B %P
369 The port number of the channel.
370 .TP
371 .B %%
372 A literal percent sign.
373 .PP
374 .RE
375 Furthermore, the the following options are supported:
376 .RS
377 .TP
378 .BR pass = \fIexitcode\fR,\fIexitcode\fR,...
379 A list of exit codes that shall be treated as a passing check.
380 The default is to only pass when the exit code is 0.
381 .RE
382 .PP
383 The following global options are defined:
384 .TP
385 .BR interval = \fIfloat
386 The interval in seconds at which the checks shall be performed.
387 If an interval is prolonged because the checks take longer than
388 the interval, the next interval will be skipped. The default
389 interval is one minute.
390 .TP
391 .BR noenable
392 Passing checks will not re-enable a soft-disabled channel.
393 .TP
394 .BR nodisable
395 Failing checks will not soft-disable an enabled channel.
396 .PP
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
397 .SH EXAMPLES
398 .PP
399 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
400 .B $ balance.fm smtp host1.test.net host2.test.net
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
401 Connection to the local SMTP port will be forwarded alterating to
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
402 the SMTP port on host1 and host2.
e1f252f Update the manpage
Marcus Holland-Moritz authored
403 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
404 runs automatically in background.
405 .PP
406 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
407 .B $ balance.fm -b 2001:DB8::1 80 10.1.1.1 10.1.1.2
408 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
409 binds on port 80 of the local IPv6 IP address 2001:DB8::1 and distributes connections
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
410 to the IPv4 addresses 10.1.1.1 and 10.1.1.2.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
411 .PP
412 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
413 .B $ balance.fm -b ::ffff:10.1.1.3 80 10.1.1.1 10.1.1.2
414 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
415 binds on port 80 of the local IPv4 IP address 10.1.1.3 (provided in IPv6 notation)
416 and distributes connections to the IPv4 addresses 10.1.1.1 and 10.1.1.2.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
417 .PP
418 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
419 .B $ balance.fm -fp imap mailserver
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
420 Connections to the local IMAP port will always be forwarded to the
421 host "mailserver".
e1f252f Update the manpage
Marcus Holland-Moritz authored
422 .I balance.fm
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
423 stays in foreground and all data is printed in readable format on
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
424 stdout.
425 .PP
426 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
427 .B $ balance.fm -f 8888 host1 10.1.1.1:8000
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
428 Connections to the local port 8888 are forwarded alternating to host1, port
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
429 8888 and the host 10.1.1.1, port 8000.
e1f252f Update the manpage
Marcus Holland-Moritz authored
430 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
431 stays in foreground connected to the "controlling tty".
432 .PP
433 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
434 .B $ balance.fm imap mailserver1::16 ! mailserver2
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
435 Two groups are specified, each containing one channel member. First up to 16
436 simultaneous connections are forwarded to "mailserver1". As soon as they are
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
437 consumed,
e1f252f Update the manpage
Marcus Holland-Moritz authored
438 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
439 proceeds with the next group (1) which will consume all remaining connections
440 forwarding them to the imap ort on "mailserver2".
441 .PP
442 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
443 .B $ balance.fm pop3 host1 host2 host3 ! failover1
444 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
445 does round robin load balancing for the three hosts in the default group 0
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
446 for pop3 services. If all three hosts in group 0 fail, all
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
447 connections are then forwarded to the host "failover1".
448 .PP
449 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
450 .B $ balance.fm telnet target.munich.net::1
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
451 Here
e1f252f Update the manpage
Marcus Holland-Moritz authored
452 .I balance.fm
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
453 is used to restrict all connections to exactly one at a time forwarding the telnet port.
454 .PP
455 .TP
e1f252f Update the manpage
Marcus Holland-Moritz authored
456 .B $ balance.fm 8888 localhost::12 ! localhost::4 ! localhost::2 localhost::2 ! localhost:25
457 This is a simple test, forming 5 groups where
458 .I balance.fm
459 is self referencing its own services 20 times. This is simply a test which
460 definitely can be tried at home.
461 .PP
462 .TP
463 .B $ balance.fm -m "connect:timeout=0.4:command=/bin/checksvc -s %S -p %P >/dev/null:pass=0,2:interval=10" 5432 svr1:5430 svr2:5430
464 does round robin load balancing for two servers. However, it also runs
465 a monitoring process that will do a health check for all servers every
466 10 seconds. It will first attempt to connect to each server using a
467 timeout of 400 milliseconds. For each server that it could connect to,
468 it will then run the program /bin/checksvc with the server's IP address
469 and port number. If the program finishes with exit codes 0 or 2, it
470 will set the server's state to enabled, otherwise it will disable the
471 server.
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
472 .SH BUGS
86d06df Whitespace cleanup of manpage
Marcus Holland-Moritz authored
473 In case that
e1f252f Update the manpage
Marcus Holland-Moritz authored
474 .I balance.fm
475 is not able to forward the connection to any destination, the
476 inital connection to
477 .I balance.fm
478 is always first accepted and then closed again immediately. This is not in every
479 case the behaviour that would have been seen directly on the destination host.
480 .SH AUTHORS
481 Marcus Holland-Moritz, Last.fm Ltd. (marcus@last.fm)
482 .PP
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
483 Thomas Obermair, Inlab Software GmbH (obermair@acm.org)
484 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
485 .I balance.fm
486 is Copyright
487 .if n (C)
488 .if t \(co
489 2012 by Marcus Holland-Moritz (marcus@last.fm) and Last.fm Ltd.
490 (http://last.fm), London, UK.
491 .PP
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
492 Copyright (c) 2000-2009,2010 by Thomas Obermair (obermair@acm.org)
493 and Inlab Software GmbH (http://www.inlab.de), Gruenwald, Germany.
494 All rights reserved.
495 .PP
e1f252f Update the manpage
Marcus Holland-Moritz authored
496 .I balance.fm
497 is released under the GNU GENERAL PUBLIC LICENSE, see the file COPYING
a790875 Initial check-in of upstream balance 3.54
Marcus Holland-Moritz authored
498 in the source code distribution.
Something went wrong with that request. Please try again.