~dpb/charms/trusty/haproxy/merge-services-fix

« back to all changes in this revision

Viewing changes to config.yaml

  • Committer: Marco Ceppi
  • Date: 2014-04-30 21:56:33 UTC
  • mfrom: (77.1.1 haproxy)
  • Revision ID: marco@ceppi.net-20140430215633-ky58nlb4m05wqdmg
[tvansteenburgh] Enable sticky sessions by default

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
              - service_name: haproxy_service
102
102
                service_host: "0.0.0.0"
103
103
                service_port: 80
104
 
                service_options: [balance leastconn]
105
 
                server_options: maxconn 100
 
104
                service_options: [balance leastconn, cookie SRVNAME insert]
 
105
                server_options: maxconn 100 cookie S{i} check
106
106
    type: string
107
107
    description: |
108
108
        Services definition(s). Although the variable type is a string, this is
112
112
        before the first variable, service_name, as above. Service options is a
113
113
        comma separated list, server options will be appended as a string to
114
114
        the individual server lines for a given listen stanza.
 
115
 
 
116
        If your web application serves dynamic content based on users' login
 
117
        sessions, a visitor will experience unexpected behaviour if each request
 
118
        is proxied to a different backend web server. Session stickiness ensures
 
119
        that a visitor 'sticks' to the backend web server which served their
 
120
        first request. This is made possible by tagging each backend server
 
121
        with a cookie. Session are sticky by default. To turn off sticky sessions,
 
122
        remove the 'cookie SRVNAME insert' and 'cookie S{i}' stanzas from
 
123
        `service_options` and `server_options`.
115
124
  sysctl:
116
125
    default: ""
117
126
    type: string