Hi,
I have configured cookie based sticky sessions with marathon-lb for wso2
servers using JSESSIONID. The following labels are required to generate the
correct ha-proxy config values and should be passed in the application
definition.
"labels": {
"HAPROXY_1_GROUP": "marathon-lb",
"HAPROXY_2_GROUP": "marathon-lb",
"HAPROXY_2_BACKEND_SERVER_OPTIONS": " server {serverName}
{host_ipv4}:{port}{cookieOptions} ssl verify none \n",
"HAPROXY_2_BACKEND_STICKY_OPTIONS": " cookie JSESSIONID prefix nocache
\n",
"HAPROXY_2_STICKY": "true",
"HAPROXY_2_SSL_CERT": "/etc/ssl/cert.pem",
"HAPROXY_2_MODE": "http"
},
I have used the default marathon SSL cert and description about each
property can be found at [1].
Resulting haproxy configs are as below.
frontend wso2bps-manager_10033
> bind *:10033 ssl crt /etc/ssl/cert.pem
> mode http
> use_backend wso2bps-manager_10033
>
> backend wso2bps-manager_10033
> 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 }
> cookie JSESSIONID prefix nocache
> server 192_168_30_79_16804 192.168.30.79:16804 check cookie 704fdf85cd
> ssl verify none
> server 192_168_30_80_31220 192.168.30.80:31220 check cookie ebd2a09eeb
> ssl verify none
Shall we add these labels to our mesos artifacts to enable sticky session
with 9443 port ?
[1] https://github.com/mesosphere/marathon-lb/blob/master/Longhelp.md
--
*Thanks and Regards,*
Anuruddha Lanka Liyanarachchi
Software Engineer - WSO2
Mobile : +94 (0) 712762611
Tel : +94 112 145 345
a <[email protected]>[email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev