Using a Load Balancer or Proxy Server with an XCC Application
This section contains important information for environments in which a Layer 3 Load Balancer such as the Amazon Elastic Load Balancer (ELB) or a proxy server sits between your XCC application and MarkLogic Server cluster.
When you use a load balancer or proxy server, it is possible for requests from your application to MarkLogic Server to be routed to different hosts, even within the same session. This has no effect on most interactions with MarkLogic Server, but queries evaluated in the context of the same multi-statement transaction need to be routed to the same host within your MarkLogic cluster. This consistent routing through a load balancer or proxy server is called session affinity.
To enable your load balancer or proxy server to preserve session affinity, you must do the following:
Enable HTTP 1.1 Compliance in XCC.
Configure the Load Balancer or Proxy Server to use the XCC
SessionID
cookie to associate a client with the MarkLogic host servicing its XCC session.