Re: [ANNOUNCE] haproxy 1.4.9

2010-10-28 Thread Willy Tarreau
On Thu, Oct 28, 2010 at 04:50:13PM -0700, Carlo Flores wrote:
> D'oh!  Thank you, Cyril!

(...)
> > > # /usr/local/sbin/haproxy -u -uc -ue -ut -ua -uto -uao (...)

and you should only use one of these -u* at a time, since they all do
the same thing and just change the sorting order !

Willy




Re: [ANNOUNCE] haproxy 1.4.9

2010-10-28 Thread Carlo Flores
D'oh!  Thank you, Cyril!

On Thu, Oct 28, 2010 at 4:45 PM, Cyril Bonté  wrote:

> Le vendredi 29 octobre 2010 01:27:30, Carlo Flores a écrit :
> > I am especially excited about the new per-URL statistics, super
> especially
> > for the average time metric.  However, I can't use these flags with my
> > build of 1.4.9 from source.
> >
> > # /usr/local/sbin/haproxy -u -uc -ue -ut -ua -uto -uao (...)
>
> Those options are not for haproxy itself but for halog (see the directory
> contrib/halog in the sources archive) ;-)
>
> --
> Cyril Bonté
>


Re: [ANNOUNCE] haproxy 1.4.9

2010-10-28 Thread Cyril Bonté
Le vendredi 29 octobre 2010 01:27:30, Carlo Flores a écrit :
> I am especially excited about the new per-URL statistics, super especially
> for the average time metric.  However, I can't use these flags with my
> build of 1.4.9 from source.
> 
> # /usr/local/sbin/haproxy -u -uc -ue -ut -ua -uto -uao (...)

Those options are not for haproxy itself but for halog (see the directory 
contrib/halog in the sources archive) ;-)

-- 
Cyril Bonté



Re: [ANNOUNCE] haproxy 1.4.9

2010-10-28 Thread Carlo Flores
... sorry about those broken new lines.   Here's the gist:
http://gist.github.com/652558

On Thu, Oct 28, 2010 at 4:27 PM, Carlo Flores  wrote:

> Thanks, Willy!
>
> I am especially excited about the new per-URL statistics, super especially
> for the average time metric.  However, I can't use these flags with my build
> of 1.4.9 from source.
>
> # /usr/local/sbin/haproxy -u -uc -ue -ut -ua -uto -uaoHA-Proxy version
> 1.4.9 2010/10/28
> Copyright 2000-2010 Willy Tarreau 
>
> Usage : /usr/local/sbin/haproxy [-f ]* [ -vdVD ] [ -n  ]
> [ -N  ]
> [ -p  ] [ -m  ]
> -v displays version ; -vv shows known build options.
> -d enters debug mode ; -db only disables background mode.
> -V enters verbose mode (disables quiet mode)
> -D goes daemon
> -q quiet mode : don't display messages
> -c check mode : only check config files and exit
> -n sets the maximum total # of connections (2000)
> -m limits the usable amount of memory (in MB)
> -N sets the default, per-proxy maximum # of connections (2000)
> -p writes pids of all children to this file
> -de disables epoll() usage even when available
> -ds disables speculative epoll() usage even when available
> -dp disables poll() usage even when available
> -sf/-st [pid ]* finishes/terminates old pids. Must be last
> arguments.
>
> # ### same with only -u and only -uc as sanity tests.
> # # haproxy -vvv HA-Proxy version 1.4.9 2010/10/28 Copyright
> 2000-2010 Willy Tarreau  Build options : TARGET = linux26 CPU =
> generic CC = gcc CFLAGS = -m32 -march=i386 -O2 -g OPTIONS = USE_PCRE=1
> Default settings : maxconn = 2000, bufsize = 16384, maxrewrite = 8192,
> maxpollevents = 200 Encrypted password support via crypt(3): yes Available
> polling systems : sepoll : pref=400, test result OK epoll : pref=300, test
> result OK poll : pref=200, test result OK select : pref=150, test result OK
> Total: 4 (4 usable), will use sepoll.
>
> # ### Thanks! Sorry if I'm just missing it! :)
>
>
>
>
>
> On Thu, Oct 28, 2010 at 3:40 PM, Willy Tarreau  wrote:
>
>  The new feature of halog is a per-URL statistics (req & error counts, avg
>> response time, total response time, and that for all or valid only
>> requests).
>> The output is sorted by a field specified from the command line flag,
>> among
>> which URL (-u), req count (-uc), err count (-ue), total time (-ut),
>> average
>> time (-ua), total time on OK reqs (-uto) and avg time on OK reqs (-uao).
>>
>
>
>


Re: [ANNOUNCE] haproxy 1.4.9

2010-10-28 Thread Carlo Flores
Thanks, Willy!

I am especially excited about the new per-URL statistics, super especially
for the average time metric.  However, I can't use these flags with my build
of 1.4.9 from source.

# /usr/local/sbin/haproxy -u -uc -ue -ut -ua -uto -uaoHA-Proxy version 1.4.9
2010/10/28
Copyright 2000-2010 Willy Tarreau 

Usage : /usr/local/sbin/haproxy [-f ]* [ -vdVD ] [ -n  ] [
-N  ]
[ -p  ] [ -m  ]
-v displays version ; -vv shows known build options.
-d enters debug mode ; -db only disables background mode.
-V enters verbose mode (disables quiet mode)
-D goes daemon
-q quiet mode : don't display messages
-c check mode : only check config files and exit
-n sets the maximum total # of connections (2000)
-m limits the usable amount of memory (in MB)
-N sets the default, per-proxy maximum # of connections (2000)
-p writes pids of all children to this file
-de disables epoll() usage even when available
-ds disables speculative epoll() usage even when available
-dp disables poll() usage even when available
-sf/-st [pid ]* finishes/terminates old pids. Must be last
arguments.

# ### same with only -u and only -uc as sanity tests.
# # haproxy -vvv HA-Proxy version 1.4.9 2010/10/28 Copyright
2000-2010 Willy Tarreau  Build options : TARGET = linux26 CPU =
generic CC = gcc CFLAGS = -m32 -march=i386 -O2 -g OPTIONS = USE_PCRE=1
Default settings : maxconn = 2000, bufsize = 16384, maxrewrite = 8192,
maxpollevents = 200 Encrypted password support via crypt(3): yes Available
polling systems : sepoll : pref=400, test result OK epoll : pref=300, test
result OK poll : pref=200, test result OK select : pref=150, test result OK
Total: 4 (4 usable), will use sepoll.

# ### Thanks! Sorry if I'm just missing it! :)





On Thu, Oct 28, 2010 at 3:40 PM, Willy Tarreau  wrote:

 The new feature of halog is a per-URL statistics (req & error counts, avg
> response time, total response time, and that for all or valid only
> requests).
> The output is sorted by a field specified from the command line flag, among
> which URL (-u), req count (-uc), err count (-ue), total time (-ut), average
> time (-ua), total time on OK reqs (-uto) and avg time on OK reqs (-uao).
>


[ANNOUNCE] haproxy 1.4.9

2010-10-28 Thread Willy Tarreau
Hi all,

since the 1.4.9 pre-release announce below, Krzysztof sent an update to
the SNMP monitoring tool and Cacti templates which I merged. This update
adds support for the per-socket statistics.

This release took almost one more week than what I'd have expected because
I wanted to add a minor feature to halog and discovered a bug in the string
support in the ebtree, that took me several days to knock down. The impact
on existing setup is between none and possible minor slowdown when matching
string ACLs among tens of thousands. I also found two minor bugfixes from
1.5 that were not backported (imprecise config error reports and wrong stats
counter incremented when TCP ACLs block a request).

The new feature of halog is a per-URL statistics (req & error counts, avg
response time, total response time, and that for all or valid only requests).
The output is sorted by a field specified from the command line flag, among
which URL (-u), req count (-uc), err count (-ue), total time (-ut), average
time (-ua), total time on OK reqs (-uto) and avg time on OK reqs (-uao).

This makes real-time monitoring a lot easier because at any moment it's
possible to know the response time distribution per URL (what URLs are
really slow, which ones consume most of the time). I'm even thinking
about incorporating that later directly into the stats interface.

URLs are cut after the first semi-colon or question mark since that's
where most dynamic params are found.

Having to sort by URL, the perf is noticeably lower than for other metrics,
but I took great care of saving every CPU cycle I could, and managed to
parse between 75 and 85 lines per second on a 2 GHz CPU, and it
takes 4 seconds on average to process one gig of logs. I think this is
still acceptable for most automatic monitoring purposes.

For the rest of the changes, I'm attaching a copy of the initial announce
below.  I've built it for x86 only right now. Sparc builds may follow
shortly.

The sources and builds are available at the usual place :
   site index : http://haproxy.1wt.eu/
   sources: http://haproxy.1wt.eu/download/1.4/src/
   changelog  : http://haproxy.1wt.eu/download/1.4/src/CHANGELOG 
   binaries   : http://haproxy.1wt.eu/download/1.4/bin/

Willy

--
> The main bugs fixed are :
>   - if the stats timeout was set before the stats socket was declared in the
> global section, the process would crash when parsing the config ;
> 
>   - HTTP header parsing used to consider commas as delimitors even within 
> quotes
> 
>   - in case of memory shortage, it was possible that a listener was disabled 
> and
> left in a dirty state ;
> 
>   - a close on an HTTP socket which contains unread data can result in 
> truncated
> responses under Linux. This has been observed only on POST requests with a
> buggy client which used to add a CRLF after the end of posted data. I want
> to particularly thank Dietrich Hasselhorn for the massive amount of tests
> and captures he has done to troubleshoot this nasty issue.
> 
>   - disabled servers could drain the requests in the proxy queue
> 
>   - when a backend lost its last server, the log could be emitted as many 
> times
> as it had zero-weight servers.
> 
>   - some info about the remaining number of servers was missing in the logs
> 
>   - many typo fixes in the doc and config parser hints
> 
> 
> That's about all for the fixes. Now there have been improvements :
> 
>   - the ECV patch was finally merged, 18 months after its first incarnation !
> It makes it possible to perform health checks based on the contents of a
> page. All remaining bugs were fixed, including the fact that it still did
> not work with responses that were spanned over multiple packets. Now the
> check buffer size can be independantly configured. At least 5 persons
> worked quite hard on this patch, so this is a real achievement.
> 
>   - Judd Montgomery and Cyril Bonté's work to support setting servers up/down
> from the stats interface has been merged. It's only enabled if a condition
> on "stats admin" is true, so there is no risk of accidentely making it
> appear. This is something that many people have been asking for in the 
> past
> and they did a really great work.
> 
>   - LDAPv3 health checks are now supported (work done by Gabor Lekeny)
> 
>   - MySQL checks now support a user name (work by Hervé Commowick)
> 
>   - Mathieu Trudel's Cacti templates were merged
> 
>   - When "option abortonclose" is set and a client disconnects while waiting
> for the server, now we forward the close notification to the server. That
> way the server can decide whether to continue or close. This is important
> for servers dealing with long polling requests.
> 
>   - A server configured as 0.0.0.0 would cause the connection to be processed
> by the system and forwarded to any local address on the machine. Since 
> this
> is stupid and causes unexpected i