Skip to main content

MarkLogic Server on Kubernetes

Configure the Application Plane

An extract of the ConfigMap responsible for the application plane is shown in this section:

## Application Plane
 
frontend marklogic-8000
  mode http
  bind :8000
  log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
  option httplog
  option forwardfor
  default_backend marklogic-8000
 
backend marklogic-8000
  mode http
  balance leastconn
  option forwardfor
  cookie haproxy insert indirect nocache maxidle 30m maxlife 4h
  stick-table type string len 32 size 10k expire 4h
  stick store-response res.cook(HostId)
  stick store-response res.cook(SessionId)
  stick match req.cook(HostId)
  stick match req.cook(SessionId)
  default-server check
  server ml-cluster-marklogic-8000-0 ml-cluster-marklogic-0.ml-cluster-marklogic-headless.ml.svc.cluster.local:8000 resolvers dns init-addr none cookie ml-cluster-marklogic-8000-0
  server ml-cluster-marklogic-8000-1 ml-cluster-marklogic-1.ml-cluster-marklogic-headless.ml.svc.cluster.local:8000 resolvers dns init-addr none cookie ml-cluster-marklogic-8000-1
  server ml-cluster-marklogic-8000-2 ml-cluster-marklogic-2.ml-cluster-marklogic-headless.ml.svc.cluster.local:8000 resolvers dns init-addr none cookie ml-cluster-marklogic-8000-2
 
frontend marklogic-8001
  mode http
  bind :8001
  log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
  option httplog
  option forwardfor
  default_backend marklogic-8001
 
backend marklogic-8001
  mode http
  balance leastconn
  option forwardfor
  cookie haproxy insert indirect nocache maxidle 30m maxlife 4h
  stick-table type string len 32 size 10k expire 4h
  stick store-response res.cook(HostId)
  stick store-response res.cook(SessionId)
  stick match req.cook(HostId)
  stick match req.cook(SessionId)
  default-server check
  server ml-cluster-marklogic-8001-0 ml-cluster-marklogic-0.ml-cluster-marklogic-headless.ml.svc.cluster.local:8001 resolvers dns init-addr none cookie ml-cluster-marklogic-8001-0
  server ml-cluster-marklogic-8001-1 ml-cluster-marklogic-1.ml-cluster-marklogic-headless.ml.svc.cluster.local:8001 resolvers dns init-addr none cookie ml-cluster-marklogic-8001-1
  server ml-cluster-marklogic-8001-2 ml-cluster-marklogic-2.ml-cluster-marklogic-headless.ml.svc.cluster.local:8001 resolvers dns init-addr none cookie ml-cluster-marklogic-8001-2
 
frontend marklogic-8002
  mode http
  bind :8002
  log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
  option httplog
  option forwardfor
  default_backend marklogic-8002
 
backend marklogic-8002
  mode http
  balance leastconn
  option forwardfor
  cookie haproxy insert indirect nocache maxidle 30m maxlife 4h
  stick-table type string len 32 size 10k expire 4h
  stick store-response res.cook(HostId)
  stick store-response res.cook(SessionId)
  stick match req.cook(HostId)
  stick match req.cook(SessionId)
  default-server check
  server ml-cluster-marklogic-8002-0 ml-cluster-marklogic-0.ml-cluster-marklogic-headless.ml.svc.cluster.local:8002 resolvers dns init-addr none cookie ml-cluster-marklogic-8002-0
  server ml-cluster-marklogic-8002-1 ml-cluster-marklogic-1.ml-cluster-marklogic-headless.ml.svc.cluster.local:8002 resolvers dns init-addr none cookie ml-cluster-marklogic-8002-1
  server ml-cluster-marklogic-8002-2 ml-cluster-marklogic-2.ml-cluster-marklogic-headless.ml.svc.cluster.local:8002 resolvers dns init-addr none cookie ml-cluster-marklogic-8002-2
 
frontend marklogic-8010
  mode http
  bind :8010
  log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
  option httplog
  option forwardfor
 
  default_backend marklogic-8010
 
backend marklogic-8010
  mode http
  balance leastconn
  option forwardfor
  cookie haproxy insert indirect nocache maxidle 30m maxlife 4h
  stick-table type string len 32 size 10k expire 4h
  stick store-response res.cook(HostId)
  stick store-response res.cook(SessionId)
  stick match req.cook(HostId)
  stick match req.cook(SessionId)
  default-server check
  server ml-cluster-marklogic-8010-0 ml-cluster-marklogic-0.ml-cluster-marklogic-headless.ml.svc.cluster.local:8010 resolvers dns init-addr none cookie ml-cluster-marklogic-8010-0
  server ml-cluster-marklogic-8010-1 ml-cluster-marklogic-1.ml-cluster-marklogic-headless.ml.svc.cluster.local:8010 resolvers dns init-addr none cookie ml-cluster-marklogic-8010-1
  server ml-cluster-marklogic-8010-2 ml-cluster-marklogic-2.ml-cluster-marklogic-headless.ml.svc.cluster.local:8010 resolvers dns init-addr none cookie ml-cluster-marklogic-8010-2
 
frontend marklogic-8011
  mode http
  bind :8011
  log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
  option httplog
  option forwardfor
 
  default_backend marklogic-8011
 
backend marklogic-8011
  mode http
  balance leastconn
  option forwardfor
  cookie haproxy insert indirect nocache maxidle 30m maxlife 4h
  stick-table type string len 32 size 10k expire 4h
  stick store-response res.cook(HostId)
  stick store-response res.cook(SessionId)
  stick match req.cook(HostId)
  stick match req.cook(SessionId)
  default-server check
  server ml-cluster-marklogic-8011-0 ml-cluster-marklogic-0.ml-cluster-marklogic-headless.ml.svc.cluster.local:8011 resolvers dns init-addr none cookie ml-cluster-marklogic-8011-0
  server ml-cluster-marklogic-8011-1 ml-cluster-marklogic-1.ml-cluster-marklogic-headless.ml.svc.cluster.local:8011 resolvers dns init-addr none cookie ml-cluster-marklogic-8011-1
  server ml-cluster-marklogic-8011-2 ml-cluster-marklogic-2.ml-cluster-marklogic-headless.ml.svc.cluster.local:8011 resolvers dns init-addr none cookie ml-cluster-marklogic-8011-2
 
frontend marklogic-8013
  mode http
  bind :8013
  log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
  option httplog
  option forwardfor
 
  default_backend marklogic-8013
 
backend marklogic-8013
  mode http
  balance leastconn
  option forwardfor
  cookie haproxy insert indirect nocache maxidle 30m maxlife 4h
  stick-table type string len 32 size 10k expire 4h
  stick store-response res.cook(HostId)
  stick store-response res.cook(SessionId)
  stick match req.cook(HostId)
  stick match req.cook(SessionId)
  default-server check
  server ml-cluster-marklogic-8013-0 ml-cluster-marklogic-0.ml-cluster-marklogic-headless.ml.svc.cluster.local:8013 resolvers dns init-addr none cookie ml-cluster-marklogic-8013-0
  server ml-cluster-marklogic-8013-1 ml-cluster-marklogic-1.ml-cluster-marklogic-headless.ml.svc.cluster.local:8013 resolvers dns init-addr none cookie ml-cluster-marklogic-8013-1
  server ml-cluster-marklogic-8013-2 ml-cluster-marklogic-2.ml-cluster-marklogic-headless.ml.svc.cluster.local:8013 resolvers dns init-addr none cookie ml-cluster-marklogic-8013-2
  • A dedicated frontend/backend is included for each port exposed by MarkLogic.

  • Each server in the backend section is declared using the FQDN of each pod:

    <pod-name>.<headless-service-name>.<release-namespace>.svc.cluster.local:<marklogic-port>

    For example:

    ml-cluster-marklogic-0.ml-cluster-marklogic-headless.ml.svc.cluster.local:8000

  • Each MarkLogic node is declared on each backed section.