Hi,

On Mon, Oct 06, Kari Mattsson wrote:
> (IP numbers are imaginary, not real.)
> When I go to http://200.200.200.111 and http://200.200.200.222, and press F5 
> (refresh) on Firefox for a few time, I end up with 4 cookies instead of 2.

For example when you go to .111 and hit refresh few times do the
requests go the same (backend)server or to both servers ?

Couple of things to check:
- what do you get in haproxy log (option httplog) when you do:
  firefox refresh test ?
  your logs should show when haproxy inserts the cookie:
  http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#8.5

- you could also use tcpdump to see what cookies firefox <-> haproxy
  send/receive ?

- have you tried testing w/out using stick table / stick on cookie ? (For
  debugging purposes?) I think just the cookie SERVICE_1 insert and
  cookie app* on server lines should be enough to get session
  persistence.

- what are you trying to store with the stick table ? I think you are
  going to have only two entries in the stick table:
  key=appl01 and key=appl02 ?

-Jarno

> backend service_1_inside
>   mode http
>   balance roundrobin   # source roundrobin leastconn ...
> 
>   stick-table type string len 32 size 100k expire 1h store 
> conn_cur,conn_rate(60s)
>   stick on cookie(SERVICE_1)
>   cookie SERVICE_1 insert indirect maxlife 1h
> 
>   default-server maxconn 1000 weight 100 inter 2s fastinter 700ms downinter 
> 10s fall 3 rise 2
>   server App_101 10.10.10.101:80 cookie app101 check
>   server App_102 10.10.10.102:80 cookie app102 check

-- 
Jarno Huuskonen

Reply via email to