Hi,

Please turn the "stick match" into "stick on" and let us know the result.

Baptiste

On Fri, Jun 7, 2013 at 10:58 PM, Mir Islam <mis...@mirislam.com> wrote:
> I am having some issues setting up  haproxy to do sticky session. My 
> configuration is provided below. Basically I am trying to stick on src 
> (eventually will need to do ssl key). But for some reason the stickiness is 
> not working and requests are being round robined. Any idea what I am doing 
> wrong in my config?
>
> Thanks
> Mir
>
>
> Configuration
> ------------------
>
> global
>         daemon
>         maxconn 256
>         #debug
>         log 127.0.0.1 local0
>
> defaults
>         timeout connect 5000ms
>         timeout client 50000ms
>         timeout server 50000ms
>
>
> listen  ssl 0.0.0.0:443
>         log global
>         option tcplog
>         default_backend https
>
> listen  ssl-enroll 0.0.0.0:8443
>         log global
>         option tcplog
>         default_backend https-enroll
>
> listen http-relay 0.0.0.0:80
>         log global
>         option tcplog
>         mode http
>         default_backend http
>
> backend http
>         mode http
>         appsession jsessionid len 100 timeout 1h
>         cookie  SERVERID insert indirect nocache
>         server  inst1-220 10.215.200.220:80 cookie server01 check inter 2000 
> fall 3
>         server  inst2-221 10.215.200.221:80 cookie server02 check inter 2000 
> fall 3
>
> backend https
>         mode tcp
>         balance roundrobin
>         srvtimeout      50000
>
>         stick match src table https-enroll
>         stick-table type ip size 200k expire 30m
>
>         server  inst1-220 10.215.200.220:443 check inter 2000 fall 3
>         server  inst2-221 10.215.200.221:443 check inter 2000 fall 3
>
>
> backend https-enroll
>         mode tcp
>         balance roundrobin
>         srvtimeout      50000
>
>         stick store-request src
>         stick-table type ip size 200k expire 30m
>
>         server  inst1-220 10.215.200.220:8443 check inter 2000 fall 3
>         server  inst2-221 10.215.200.221:8443 check inter 2000 fall 3
>
>
> Haproxy Log entries (portions)
> -----------------------------------------
>
>
> Jun  7 13:52:15 localhost haproxy[17345]: 10.206.15.42:52997 
> [07/Jun/2013:13:52:15.945] ssl https/inst2-221 1/0/12 2768 -- 5/5/5/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:52998 
> [07/Jun/2013:13:52:15.955] ssl https/inst1-220 1/1/239 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:52999 
> [07/Jun/2013:13:52:16.194] ssl https/inst2-221 1/2/8 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53000 
> [07/Jun/2013:13:52:16.204] ssl https/inst1-220 1/1/6 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53001 
> [07/Jun/2013:13:52:16.211] ssl https/inst2-221 1/0/6 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53002 
> [07/Jun/2013:13:52:16.218] ssl https/inst1-220 1/0/6 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53003 
> [07/Jun/2013:13:52:16.226] ssl https/inst2-221 1/0/11 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53004 
> [07/Jun/2013:13:52:16.238] ssl https/inst1-220 1/0/5 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53005 
> [07/Jun/2013:13:52:16.244] ssl https/inst2-221 1/0/236 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53006 
> [07/Jun/2013:13:52:16.481] ssl https/inst1-220 1/2/7 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53007 
> [07/Jun/2013:13:52:16.490] ssl https/inst2-221 1/1/12 2768 -- 5/5/5/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53008 
> [07/Jun/2013:13:52:16.501] ssl https/inst1-220 1/0/6 2768 -- 5/5/5/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53009 
> [07/Jun/2013:13:52:16.508] ssl https/inst2-221 1/0/6 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53010 
> [07/Jun/2013:13:52:16.516] ssl https/inst1-220 1/1/8 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53011 
> [07/Jun/2013:13:52:16.526] ssl https/inst2-221 1/0/30 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53012 
> [07/Jun/2013:13:52:16.558] ssl https/inst1-220 1/0/7 2768 -- 4/4/4/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:53013 
> [07/Jun/2013:13:52:16.567] ssl https/inst2-221 1/1/32 2843 -- 5/5/5/2/0 0/0
> Jun  7 13:52:16 localhost haproxy[17345]: 10.206.15.42:52959 
> [07/Jun/2013:13:52:16.577] ssl https/inst1-220 1/0/45 2843 -- 4/4/4/2/0 0/0
>
>
>

Reply via email to