Report bound port correctly
[beanstalkd.git] / doc / beanstalkd.ronn
blob35a6950859644f8997246cc07363aa8fceb2d64b
1 beanstalkd(1) -- simple, fast work queue
2 ========================================
4 ## SYNOPSIS
6 `beanstalkd` [<options>]
8 ## DESCRIPTION
10 `Beanstalkd` is a simple work-queue service. Its interface is
11 generic, though it was originally designed for reducing the latency of
12 page views in high-volume web applications by running time-consuming
13 tasks asynchronously.
15 When started, `beanstalkd` opens a socket (or uses a file descriptor
16 provided by the init(1) system, see [ENVIRONMENT][]) and listens for
17 incoming connections. For each connection, it reads a sequence of
18 commands to create, reserve, delete, and otherwise manipulate "jobs",
19 units of work to be done. See file `doc/protocol.txt` in the
20 `beanstalkd` distribution for a thorough description of the meaning
21 and format of the `beanstalkd` protocol.
23 ## OPTIONS
25 * `-b` <path>:
26   Use a binlog to keep jobs on persistent storage in directory <path>.
27   Upon startup, `beanstalkd` will recover any binlog that is present
28   in <path>, then, during normal operation, append new jobs and
29   changes in state to the binlog.
31 * `-c`:
32   Perform online, incremental compaction of binlog files. Negates
33   `-n`. This is the default behavior.
35   (Do not use this option, except to negate `-n`. Both `-c` and `-n`
36   will likely be removed in a future `beanstalkd` release.)
38 * `-f` <ms>:
39   Call fsync(2) at most once every <ms> milliseconds. Larger values
40   for <ms> reduce disk activity and improve speed at the cost of
41   safety. A power failure could result in the loss of up to <ms>
42   milliseconds of history.
44   A <ms> value of 0 will cause `beanstalkd` to call fsync every time
45   it writes to the binlog.
47   (This option has no effect without `-b`.)
49 * `-F`:
50   Never call fsync(2). Equivalent to `-f` with an infinite <ms> value.
52   This is the default behavior.
54   (This option has no effect without `-b`.)
56 * `-h`:
57   Show a brief help message and exit.
59 * `-l` <addr>:
60   Listen on address <addr> (default is 0.0.0.0).
62   (Option `-l` has no effect if sd-daemon(5) socket activation is
63   being used. See also [ENVIRONMENT][].)
65 * `-n`:
66   Turn off binlog compaction, negating `-c`.
68   (Do not use this option. Both `-c` and `-n` will likely be removed
69   in a future `beanstalkd` release.)
71 * `-p` <port>:
72   Listen on TCP port <port> (default is 11300).
74   (Option `-p` has no effect if sd-daemon(5) socket activation is
75   being used. See also [ENVIRONMENT][].)
77 * `-s` <bytes>:
78   The size in bytes of each binlog file.
80   (This option has no effect without `-b`.)
82 * `-u` <user>:
83   Become the user <user> and its primary group.
85 * `-V`:
86   Increase verbosity. May be used more than once to produce more
87   verbose output. The output format is subject to change.
89 * `-v`:
90   Print the version string and exit.
92 * `-z` <bytes>:
93   The maximum size in bytes of a job.
95 ## ENVIRONMENT
97 * `LISTEN_PID`, `LISTEN_FDS`:
98   These variables can be set by init(1). See sd_listen_fds(3) for
99   details.
101 ## SEE ALSO
103 sd-daemon(5), sd_listen_fds(5)
105 Files `README` and `doc/protocol.txt` in the `beanstalkd`
106 distribution.
108 <http://kr.github.com/beanstalkd/>
110 ## AUTHOR
112 `Beanstalkd` is written and maintained by Keith Rarick with the help
113 of many others.