I have a stack that requires session persistence at the Tomcat layer, and I’d like to front-end it with the built-in Rancher load balancer (HAproxy). Right now, my docker-compose.yml file has this entry for the load balancer:
Are there any labels I can use to specify sticky sessions, including a cookie name, etc? The labels for rancher loadbalancer don’t seem to be documented well. I’m able to manually add a service if I deploy without the load balancer, but if I deploy the stack using rancher-compose, then I’m unable to modify session stickiness settings after the fact.
Anyone? I suppose without official support for session persistence through compose, we will be stuck manually deploying Rancher load balancers for the time being.
I would recommend using the UI to see the stickiness options. Then you can click on the stack name and click on “View Config” of the stack to see the related rancher-compose.yml options.
Great idea, Denise; I didn’t think to look at the configuration generated. By the way, in case anyone is interested in how to do this, in rancher-compose.yml, my load balancer service looks like this: