LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

beanstalkd

Simple and fast work queue server

TLDR

Start beanstalkd on the default port
$ beanstalkd
copy
Start on a specific address and port
$ beanstalkd -l [127.0.0.1] -p [11300]
copy
Run with persistent storage (binlog)
$ beanstalkd -b [/var/lib/beanstalkd]
copy
Run as a specific user (drop privileges)
$ beanstalkd -u [beanstalkd]
copy
Set maximum job size
$ beanstalkd -z [65535]
copy
Start in verbose mode (use -VV for more detail)
$ beanstalkd -V
copy
Print version and exit
$ beanstalkd -v
copy

SYNOPSIS

beanstalkd [-l addr] [-p port] [-u user] [-z bytes] [-b path] [-V] [-h]

DESCRIPTION

beanstalkd is a simple, fast work queue server. It provides a generic interface for managing job queues, originally designed for reducing latency in high-volume web applications by running time-consuming tasks asynchronously.Jobs are pushed to the queue by producers and reserved by workers (consumers) for processing. The protocol supports job priorities, delays, time-to-run limits, and multiple named tubes (queues).

PARAMETERS

-l addr

Listen on address (IP or 0.0.0.0 for all interfaces). Default: 0.0.0.0
-p port
Listen on TCP port. Default: 11300
-u user
Drop privileges and run as specified user after binding to port
-z bytes
Maximum job size in bytes. Default: 65535 (64KB)
-b path
Enable binlog for job persistence in the specified directory
-f ms
Sync binlog to disk every ms milliseconds (default 50ms, 0 for every write)
-s bytes
Maximum binlog file size in bytes. Default: 10485760 (10MB)
-v
Print version and exit
-V
Increase verbosity. Use once for basic, twice (-VV) for detailed logging
-h
Print help message with available options

CAVEATS

By default, beanstalkd stores all jobs in memory; a restart loses all queued jobs unless -b binlog is enabled. There is no authentication mechanism built-in; secure access through firewall rules or bind to localhost only. Jobs exceeding the maximum size (-z) are rejected.

HISTORY

Beanstalkd was created by Keith Rarick in 2007 at Causes.com to handle background job processing. It gained popularity as a lightweight alternative to heavier message queue systems, known for its simplicity and sub-millisecond latency.

SEE ALSO

Copied to clipboard
Kai