libra/doc/worker/config.rst
David Shrewsbury 4d3fd33614 [ALL] Add Gearman KEEPALIVE options
This requires the lastest development version of python-gearman
to support the new keepalive options. Using these options (off
by default) will solve the problem when the Gearman job server
gets paused/unpaused in a cloud environment, but the clients and
workers never recognize that they are indeed disconnected.

WARNING: Not backwards compatible with older versions of the
python-gearman driver, even if the SSL and keepalive options
are not specified. This is a change in behavior.

Change-Id: Ic8db6676f7408364b6fe9a8690deb72bb6e2772c
2013-09-16 12:56:38 -04:00

2.6 KiB

Worker Configuration

These options are specific to the worker in addition to the common options </config>.

Configuration File

The [worker] section is specific to the libra_worker utility. Below is an example:

[worker]
driver = haproxy
reconnect_sleep = 60
server = 10.0.0.1:8080 10.0.0.2:8080

Command Line Options

libra_worker

--driver <DRIVER>

Load balancer driver to use. Valid driver options are:

  • haproxy - HAProxy software load balancer. This is the default driver.

--gearman_keepalive

Use TCP KEEPALIVE to the Gearman job server. Not supported on all systems.

--gearman_keepcnt <COUNT>

Maximum number of TCP KEEPALIVE probes to send before killing the connection to the Gearman job server.

--gearman_keepidle <SECONDS>

Seconds of idle time on the Gearman job server connection before sending TCP KEEPALIVE probes.

--gearman_keepintvl <SECONDS>

Seconds between TCP KEEPALIVE probes.

--gearman_ssl_ca <FILE>

Full path to the file with the CA public key to use when connecting to an SSL-enabled Gearman job server. This is used to validate the server key.

--gearman_ssl_cert <FILE>

Full path to the file with the SSL public key to use when connecting to an SSL-enabled Gearman job server.

--gearman_ssl_key <FILE>

Full path to the file with the SSL private key to use when connecting to an SSL-enabled Gearman job server.

-s <SECONDS>, --reconnect_sleep <SECONDS>

The number of seconds to sleep between job server reconnect attempts when no specified job servers are available. Default is 60 seconds.

--server <HOST:PORT>

Used to specify the Gearman job server hostname and port. This option can be used multiple times to specify multiple job servers.

--stats-poll <SECONDS>

The number of seconds to sleep between statistics polling of the load balancer driver. Default is 300 seconds.

--gearman-poll <SECONDS>

The number of seconds gearman will poll before re-shuffling its connections. Default is 1 second.

--syslog

Send log events to syslog.

--syslog-socket

Socket to use for the syslog connection. Default is /dev/log.

--syslog-facility

Syslog logging facility. Default is LOCAL7.