Re: Newbie questions and a bug report

From: Willy Tarreau <w#1wt.eu>
Date: Sat, 29 Sep 2007 11:42:18 +0200


Hi John,

I'm following up on Bryan's response.

On Thu, Sep 27, 2007 at 11:59:40AM -0400, Bryan Germann wrote:
> 1) See the architecture guide. One simple solution is to set the weight of
> the server you wish to take down to 0. Then do a hot reconfiguration with
> the -sf command option (which may only be available in 1.3.x).

If this is for maintenance, you can also use backup servers with checks on the real port, and active servers with checks on a dummy port that you control from the server (eg: inetd). There's an example in the configuration manual.

2) you need "option httpclose". HAproxy does not yet support HTTP keepalive,

   so everything after the first request is considered data. This is the    reason for problem 4) too.

> 3) I don't think a server is required for the 1.3.x releases, but in
> 1.2.xyou can just setup a dummy server that points to your HAProxy
> box. Example:
> "server dummy <ip_of_haproxy_server>:80".

Confirmed, 1.2 expects a server. However, using the same IP:port as the proxy is risky (risk of loop in case you use the same port as the stats, and some request is not trapped by the stats URI). Use "0.0.0.0:0", I think it works.

> 5) Not that I'm aware of, it looks like haproxy only support internet
> sockets.

Confirmed. The reason is that the daemon goes into a chroot, from where it would loose the ability to reconnect to the UNIX socket, should the syslogd restart. If you're using a redhat, don't forget to add "-r" to the command line of your syslog daemon so that it listens to the UDP socket too.

regards,
Willy

> --Bryan
>
> On 9/27/07, Lauro, John <jlauro#umflint.edu> wrote:
> >
> > I have an update? Doing some checking persistent connections was not
> > working from IE direct to host either. Found an over aggressive SetEnvIf ?
> > downgrade-1.0 on the host?
> >
> >
> >
> > With that fixed on the host side, now I see incomplete logging bug with
> > internet explorer too? hmm? double checking the docs I see this is
> > expected behavior (not a bug) as it's only one log entry per connection, and
> > with persistent connections that makes sense. Not sure if I would want to,
> > but is it possible to have it log every request over a persistent connection
> > instead of just the first?
> >
> >
> >
> > Questions 1, 3, and 5 still apply. Thanks.
> >
> >
> >
> >
> > ------------------------------
> >
> > *From:* Lauro, John [mailto:jlauro#umflint.edu]
> > *Sent:* Thursday, September 27, 2007 2:20 AM
> > *To:* haproxy#formilux.org
> > *Subject:* Newbie questions and a bug report
> >
> >
> >
> > Hello,
> >
> >
> >
> > I am attempting to setup haproxy. It appears to be a fairly good choice in
> > the open source options available. Look like the mail list was created
> > perfect timing for me to send questions. J
> >
> >
> >
> > I think it's mostly configured ok, but including my config if you can spot
> > any obvious bad or missing settings? It's not really tuned or load tested,
> > so I do plan on tweaking some of them more once I put a real load through. I
> > messed with a few settings trying to get persistent connections to work. I
> > think persistent connections are working with this configuration for
> > firefox, but not internet explorer. So, even though testing with just one
> > user, it's creating tons of TIME_WAIT states.
> >
> >
> >
> >
> >
> > 1. How can I mark a server as down or going down? I don't want it to fail
> > over for existing users, but I want it out of the rotation for new
> > sessions. Then, I can leave it be for a few hours, do maintenance on it,
> > and then how do I bring it back into the rotation? Seems like this would be
> > possible on the admin page, but nothing seems clickable.
> >
> >
> >
> > 2. How do I fix persistent connections when using internet explorer?
> >
> >
> >
> > I am using version 1.2.17. (I just testing, and so can easily try 1.3 if
> > you think it will help?)
> >
> > Here is my config: (Note: Just in testing, so bb1, bb2, bb3, and bb4 are
> > all in the /etc/hosts file with the same IP?)
> >
> >
> >
> > global
> >
> > maxconn 20000
> >
> > ulimit-n 65535
> >
> > log 127.0.0.1 audit debug
> >
> >
> >
> > listen bb_balancer
> >
> > mode http
> >
> > bind :80
> >
> > cookie UMFBBID insert nocache indirect
> >
> > option httplog
> >
> > option dontlognull
> >
> > retries 4
> >
> > redispatch
> >
> > contimeout 5000
> >
> > clitimeout 150000
> >
> > srvtimeout 100000
> >
> > maxconn 10000
> >
> > balance roundrobin
> >
> > server bb1 bb1.umflint.edu:80 cookie bb1 check port 80 inter 4000
> > fall 3 rise 5 maxconn 50
> >
> > server bb2 bb2.umflint.edu:80 cookie bb2 check port 80 inter 4000
> > fall 3 rise 5 maxconn 50
> >
> > server bb3 bb3.umflint.edu:80 cookie bb3 check port 80 inter 4000
> > fall 3 rise 5 maxconn 50
> >
> > server bb4 bb4.umflint.edu:80 cookie bb4 check port 80 inter 4000
> > fall 3 rise 5 maxconn 50
> >
> > # option httpclose
> >
> > # option abortonclose
> >
> > option tcpka
> >
> > log global
> >
> >
> >
> > listen admin_page :8080
> >
> > mode http
> >
> > stats uri /lb_stats
> >
> > stats realm GlobalStats
> >
> > stats auth admin:?????
> >
> > balance roundrobin
> >
> > server bb bb.umflint.edu:80
> >
> > contimeout 5000
> >
> > clitimeout 150000
> >
> > srvtimeout 100000
> >
> >
> >
> >
> >
> > 3. I want admin_page to be for stats only. How come the config checker
> > insists on specifying a server?
> >
> >
> >
> > 4. The bug report.... and I am would guess it is related to the
> > persistent connections? Log entries are going fine to syslog (once I
> > enabled net login) for internet explorer? However, with firefox I a do not
> > see any log entries. Once I close firefox, I only receive the first couple
> > (I think it's the first couple) URLs, even though there should be dozens of
> > hits.
> >
> >
> >
> > 5. Probably just missed this in the docs, but? is there a standard local
> > syslog option instead of 127.0.0.1 so I don't have to tell syslog to
> > listen to ip?
> >
Received on 2007/09/29 11:42

This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET