Detailed profiles of global haproxy

Configuration example:

global
    log 127.0.0.1 local0 info
    maxconn 4096
    user nobody
    group nobody
    daemon
    nbproc 1
    pidfile /usr/local/haproxy/logs/haproxy.pid

 

The following describes the meaning of each option:

log: global logging setting, local0 is logging equipment, info represents the log level. Log level which has err, warning, info, debug four optional. This configuration represents the use rsyslog service on 127.0.0.1 in local0 logging equipment, logging rating info.

maxconn: setting each haproxy process acceptable maximum number of concurrent connections, this option is equivalent to the Linux command line option "ulimit -n".

user / group: provided haproxy running processes and user groups, may also be used uid and gid values instead of users and groups.

daemon: Set HAProxy process into the background. This is the recommended mode of operation.

nbproc: Set the number of processes that can be created when HAProxy start, this parameter requires HAProxy operating mode is set to "daemon", by default only start a process. According to experience, this value should be set smaller than the number of server CPU core. Create multiple processes, each process can reduce job queue, but too many processes could lead to the collapse of the process.

pidfile: Specifies the pid file HAProxy process. User-initiated process must have permission to access this file.

Guess you like

Origin www.cnblogs.com/yyxianren/p/10942906.html