#
# This is an example reverse configuration doing load balancing.
#
# See doc/config-guide.txt for descriptions of each command (line)
# and configuration syntax.
#


# this service's nodes are configured via a pool object.  if you need
# to change them, telnet on in to the management port and you and/or your
# scripts can change them on the fly

LOAD StickySessions
LOAD Stats

XS ENABLE headers

CREATE POOL main
  POOL main ADD 127.0.0.1:80

CREATE POOL jetty
  POOL jetty ADD 127.0.0.1:8480
  POOL jetty ADD 127.0.0.1:8880

CREATE SERVICE balancer
  SET listen          = 0.0.0.0:8089
  SET role            = reverse_proxy
  SET pool            = jetty
  SET persist_client_timeout = 3600
  SET persist_client  = on
  SET persist_backend = on
  SET buffer_size     = 0k
  SET enable_error_retries = on
  SET error_retry_schedule = 0,.25,.25,.25,.25
  SET always_trusted  = true
  SET backend_persist_cache = 4
  SET connect_ahead  = 1
  SET enable_reproxy = true
  SET verify_backend  = on
  SET verify_backend_path = /up.html
  SET plugins 	      = stats,stickysessions
ENABLE balancer

# always good to keep an internal management port open:
CREATE SERVICE mgmt
  SET role   = management
  SET listen = 127.0.0.1:60000
ENABLE mgmt