Hi Willy,

i'll attach one session out of the logfile that goes wrong.  As the session
begins, the first request has NI as cookie state which is logical because
it's a new session.  Then you see some activity during the session where
the cookie state has VN as value.  The last entry the cookie state all of a
sudden is NI and the backend changes to a different server.

What could be the cause of the NI during a session ?

the full haproxy config is :

global
        log 127.0.0.1   local0
        log 127.0.0.1   local1 notice
        #log loghost    local0 info
        maxconn 128000
        #debug
        #quiet
        user haproxy
        group haproxy

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        option redispatch
        hash-type consistent
        maxconn         100000
        timeout connect     36000
        timeout client     300000
        timeout server     300000

frontend http_proxy
        bind 10.130.101.101:80
        acl is_forms url_sub forms
        use_backend weblogic-forms if is_forms
        default_backend weblogic-overig

backend weblogic-forms
       mode http
       stats enable
       balance roundrobin
       cookie SERVERID insert indirect nocache
       option http-server-close
       option forwardfor
       option httpchk HEAD /check.txt HTTP/1.0
       server ias01n 10.130.101.5:80 check cookie ias01 weight 50
       server ias02n 10.130.101.6:80 check cookie ias02 weight 50
       server ias05n 10.130.101.1:80 check cookie ias05 weight 30

backend weblogic-overig
       mode http
       stats enable
       balance roundrobin
       cookie SERVERID insert indirect nocache
       option http-server-close
       option forwardfor
       option httpchk HEAD /check.txt HTTP/1.0
       server ias01n 10.130.101.5:80 check cookie ias01 weight 30
       server ias02n 10.130.101.6:80 check cookie ias02 weight 30
       server ias05n 10.130.101.1:80 check cookie ias05 weight 30


thank you
Yves


On Thu, Sep 17, 2015 at 3:03 PM, Willy Tarreau <[email protected]> wrote:

> Hi Yves,
>
> On Thu, Sep 17, 2015 at 02:12:23PM +0200, Yves Van Wert wrote:
> > Hi Willy,
> >
> > thank you for your quick response.
> >
> > I've changed the parameter but this didn't make any difference.  I still
> > see a few connections changing backend servers without me being able to
> > explain this.  Do you have any other pointers as to where i can look ?
> >
> > New config :
> > backend weblogic-forms
> >         mode http
> >         balance roundrobin
> >         cookie SERVERID insert indirect nocache
> >         option http-server-close
> >         option forwardfor
> >         option httpchk HEAD /check.txt HTTP/1.0
> >         option log-health-checks
> >         stats enable
> >         stats auth admin:axihaproxy
> >         server ias03 10.64.0.81:8888  cookie ias03 check inter 3000
> rise 5
> > fall 6 weight 40
> >         server ias04 10.64.0.82:8888  cookie ias04 check inter 3000
> rise 5
> > fall 6 weight 10
> >         server ias05 10.64.0.181:8888 cookie ias05 check inter 3000
> rise 5
> > fall 6 weight 40
> >         server ias06 10.64.0.182:8888 cookie ias06 check inter 3000
> rise 5
> > fall 6 weight 10
>
> At this point your logs will be needed. Here are the possibilities :
>
>   - the client forgets to send the cookie and is redistributed
>
>   - a server occasionally fails to accept the connection and after a few
>     retries, the connection is sent to another one (when "option
> redispatch"
>     is present)
>
>   - a server occasionally does a down/up cycle and its requests are
>     redistributed but I think you said this didn't happen.
>
> The logs will indicate what's happening when you see the request being
> sent to the wrong server : the cookie flags will tell you whether an
> invalid, absent, valid cookie was present and if it targetted a down or
> an up server.
>
> Just out of curiosity, would you happen to have another backend behind the
> same frontend, on the same domain name, with the same cookie names ? It
> would be possible that some users switch from the two sites and retrieve
> another backend's cookie. For example, let's say you have 4 servers in this
> farm named ia03 to ia06, and another farm has only 3 servers named ia03 to
> ia05. Visitors of your first farm getting cookie ia06 will then go to the
> second farm with this cookie which will be invalid, be assigned a new one
> and when they come back to the first farm, they'll go to the server matched
> by this cookie.
>
> Hoping this helps,
> Willy
>
>

Reply via email to