Hello Willy,

I have worked about this issue and find out some interesting things about what 
was going on. You put me on the right way, thanks for that. In fact, my 
application is sending HTTP requests to many web servers (at  least 6). Since 
the same cookie name was used in HAPROXY  for all servers, the cookie value was 
set according to server to which HTTP requests was sent. this explain why 
affinity between my browser and serv_1 or serv_2 was broken. I have updated 
cookie name for each pair of servers (serv_1 & serv_2 have the same fonction, 
Serv_3 et Serv_4 also and so on...). Now when setting cookies to check a 
specific server, all HTTP requests are sent to the desired server. Thank you 
very much for your help.



________________________________
De : Mouny Jean michel <jmm97...@yahoo.fr>
À : "haproxy@formilux.org" <haproxy@formilux.org>
Envoyé le : Samedi 9 Juillet 2011 0h25
Objet : force-persist


Hello Willy,


I have the following HAProxy configuration installed on a reverse proxy. Behind 
this reverse proxy, there are 2 web servers (Serv_1 & Serv_2). If I stopped 
Serv_1, 
all HTTP requests from my browser are sent to Serv_2 even if cookie 
serv1_cookie is set and CHECK_FRONTEND is equal to true in my browser. Since I 
used force_persist 
option in HAProxy, my HTTP requests should be routed to Serv_1. I don't 
understand what"s going on. Please could you help me about this issue?

listen vip_appli01
         bind vip_appli01.mycompany.fr:5080
         option httplog
         option httpclose
         option
 forwardfor
         balance roundrobin
         cookie SERVERID insert indirect
         acl My_Requets hdr_sub(cookie) CHECK_FRONTEND=true
         force-persist if My_Requets
         server Serv_1 HAP-Serv_1:80 cookie serv1_cookie check port 80 inter 
10000 rise 3 fall 3
         option httpchk GET /failover/LBfailoverFlag.gif HTTP/1.1\r\nHost:\ 
192.168.231.13
         server Serv_2 HAP-Serv_2:80 cookie serv2_cookie check port 80 inter 
10000 rise 3 fall 3


                                                                                
                +--   Serv_1
Internet  ---- Reverse Proxy with Haproxy with force-persist ---|
                                                                                
                 +--  Serv_2

Reply via email to