Configuring
***********

Supported options
=================

The recipe supports the following options:

daemon - Daemon 0|1
    Have Pound run in the foreground (if 0) or as a daemon (if 1). By default Pound runs as a daemon (detaches itself from the controlling terminal and puts itself in the background). By specifying this option you can force Pound to work like a regular process. Useful for debugging or if you want to use something like daemontools.

log_facility - LogFacility value
    Specify the log facility to use. value (default: daemon) must be one of the symbolic facility names defined in syslog.h. This facility shall be used for logging. Using a - for the facility name causes Pound to log to stdout/stderr.

log_level - LogLevel value
    Specify the logging level: 0 for no logging, 1 (default) for regular logging, 2 for extended logging (show chosen backend server as well), 3 for Apache-like format (Combined Log Format with Virtual Host), 4 (same as 3 but without the virtual host information) and 5 (same as 4 but with information about the Service and BackEnd used). This value can be overridden for specific listeners.

dynscale - DynScale 0|1
    Enable or disable the dynamic rescaling code (default: 0). If enabled Pound will periodically try to modify the back-end priorities in order to equalise the response times from the various back-ends. This value can be overridden for specific services.

alive - Alive value
    Specify how often Pound will check for resurected back-end hosts (default: 30 seconds). In general, it is a good idea to set this as low as possible - it will find resurected hosts faster. However, if you set it too low it will consume resources - so beware.

client - Client value
    Specify for how long Pound will wait for a client request (default: 10 seconds). After this long has passed without the client sending any data Pound will close the connection. Set it higher if your clients time-out on a slow network or over-loaded server, lower if you start getting DOS attacks or run into problems with IE clients. This value can be overridden for specific listeners.

timeout - TimeOut value
    How long should Pound wait for a response from the back-end (in seconds). Default: 15 seconds.

grace - Grace value
    How long should Pound continue to answer existing connections after a receiving and INT or HUP signal (default: 30 seconds). The configured listeners are closed immediately. You can bypass this behaviour by stopping Pound with a TERM or QUIT signal, in which case the program exits without any delay.

balancers - list of listener http with backend
    Set the list of backends, the list by default is
    **name adress:port adress-backend-1:port-backend-1(,priority,timeOut)  adress-backend-2:port-backend-2(,priority,timeOut) ... adress-backend-n:port-backend-n(,priority,timeOut)**

executable - path to pound, required if pound executable is not provided by the build recipe


Example usage
=============

We'll start by creating a buildout that uses the recipe::

    >>> write('buildout.cfg',
    ... """
    ... [buildout]
    ... parts = configpound
    ...
    ... [configpound]
    ... recipe = iw.recipe.pound:config
    ... balancers =
    ...    one  127.0.0.1:80 127.0.0.1:8080 127.0.0.1:8081,1
    ...    two  0.0.0.0:81 127.0.0.1:8082,1,120 127.0.0.1:8083 169.1.1.2:80
    ...
    ... """ )

Running the buildout gives us::

    >>> print system(buildout)
    Installing configpound.
    ...
