dcos edge-lb lb-config

Reference for the dcos edge-lb lb-config command

Use this command to show the running loa balancer configuration associated with the pool. You can view the active load balancer configuration for all load balancers in a pool.


dcos edgelb lb-config <pool-name> [options]


Name, shorthand Description
--help, -h Display usage information.
--verbose, -v Enable additional logging of requests and responses.
--name="<name>" Specify the name of the service instance to query.
--raw Show unparsed load balancer configuration.


The following command displays the load balancer configuration settings for the ping-lb pool:

dcos edgelb lb-config ping-lb

The command displays the haproxy load balancer template with content similar to the following:

  # Do not enable as haproxy works under a supervisor and must not fork into
  # the background:
  # daemon
  log /dev/log local0
  spread-checks 5
  max-spread-checks 15000
  maxconn 50000
  tune.ssl.default-dh-param 2048
  ssl-default-bind-options no-sslv3 no-tlsv10 no-tls-tickets
  ssl-default-server-options no-sslv3 no-tlsv10 no-tls-tickets
  # Required to provide seamless reloads. The supervisor config for haproxy
  # adds '-W' option to enable master-worker model:
  stats socket /var/run/haproxy/socket expose-fd listeners
  server-state-file global
  server-state-base /var/state/haproxy/
  lua-load "$LBWORKDIR/haproxy/lua/getpids.lua"
  lua-load "$LBWORKDIR/haproxy/lua/getconfig.lua"
  lua-load "$LBWORKDIR/haproxy/lua/getmaps.lua"
  lua-load "$LBWORKDIR/haproxy/lua/signalmlb.lua"
  load-server-state-from-file global
  log               global
  retries                   3
  backlog               10000
  maxconn               10000
  timeout connect          3s
  timeout client          30s
  timeout server          30s
  timeout tunnel        3600s
  timeout http-keep-alive  1s
  timeout http-request    15s
  timeout queue           30s
  timeout tarpit          60s
  option            dontlognull
  option            http-server-close
  option            redispatch
  default-server resolve-prefer ipv4
  default-server init-addr last,libc,none
resolvers default_resolvers
  nameserver ns1
  nameserver ns2
  nameserver ns3
  hold valid           2s
  hold other           2s
  hold refused         2s
  hold nx              2s
  hold timeout         2s
  hold valid           2s
listen stats
  mode http
  stats enable
  monitor-uri /_haproxy_health_check
  acl getpid path /_haproxy_getpids
  http-request use-service lua.getpids if getpid
  acl getvhostmap path /_haproxy_getvhostmap
  http-request use-service lua.getvhostmap if getvhostmap
  acl getappmap path /_haproxy_getappmap
  http-request use-service lua.getappmap if getappmap
  acl getconfig path /_haproxy_getconfig
  http-request use-service lua.getconfig if getconfig
  acl signalmlbhup path /_mlb_signal/hup
  http-request use-service lua.signalmlbhup if signalmlbhup
  acl signalmlbusr1 path /_mlb_signal/usr1
  http-request use-service lua.signalmlbusr1 if signalmlbusr1
  frontend frontend_0.0.0.0_15001
      mode http
      option httplog
      default_backend ping-backend
  backend ping-backend
    balance roundrobin
      mode http
          option forwardfor
          http-request set-header X-Forwarded-Port %[dst_port]
          http-request add-header X-Forwarded-Proto https if { ssl_fc }
            server agentip_10.0.1.128_10006 check