]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
17 years ago[BUILD] major rework of the GNU Makefile
Willy Tarreau [Wed, 2 Jan 2008 19:48:34 +0000 (20:48 +0100)] 
[BUILD] major rework of the GNU Makefile

The build process was getting annoying under some conditions,
especially on platforms which are used to set CFLAGS, as well
as those which set a lot of complex defines. The new Makefile
takes care of this situation by not mixing TARGET, CPU and user
values, and by making privileging the pre-setting of common
variables with the ability to override them.

Now CFLAGS and LDFLAGS are set by default and may be overridden
without the risk of breaking useful defines. Options are better
dealt with, and as a bonus, it was possible to merge the FreeBSD
and OpenBSD targets into the common GNU Makefile.

The report of build options by "haproxy -vv" has been slightly
adapted to the new mode. Options implied by architecture are not
reported, only user-specified options are. It is also possible to
add options which will not be reported in order not to mangle the
output when specifying dirty informations such as URLs...

The Makefile was copiously documented and it should be easier to
build for any target now. Backwards compatibility with older
build processes was kept, and warnings are emitted for deprecated
build options.

17 years ago[DOC] document more options
Willy Tarreau [Fri, 28 Dec 2007 16:42:56 +0000 (17:42 +0100)] 
[DOC] document more options

All options up to and including "forceclose" have been documented.

17 years ago[DOC] large update to the configuration manual
Willy Tarreau [Thu, 27 Dec 2007 17:26:09 +0000 (18:26 +0100)] 
[DOC] large update to the configuration manual

Keywords from "errorloc" to "monitor-uri" inclusive have been added.
Some fixes applied too.

17 years ago[MEDIUM]: Inversion for options
Krzysztof Oledzki [Tue, 25 Dec 2007 01:40:22 +0000 (02:40 +0100)] 
[MEDIUM]: Inversion for options

This patch adds a possibility to invert most of available options by
introducing the "no" keyword, available as an additional prefix.
If it is found arguments are shifted left and an additional flag (inv)
is set.

It allows to use all options from a current defaults section, except
the selected ones, for example:

-- cut here --
defaults
        contimeout      4200
        clitimeout      50000
        srvtimeout      40000
        option contstats

listen stats 1.2.3.4:80
no option contstats
-- cut here --

Currenly inversion works only with the "option" keyword.

The patch also moves last_checks calculation at the end of the readcfgfile()
function and changes "PR_O_FORCE_CLO | PR_O_HTTP_CLOSE" into "PR_O_FORCE_CLO"
in cfg_opts so it is possible to invert forceclose without breaking httpclose
(and vice versa) and to invert tcpsplice in one proxy but to keep a proper
last_checks value when tcpsplice is used in another proxy. Now, the code
checks for PR_O_FORCE_CLO everywhere it checks for PR_O_HTTP_CLOSE.

I also decided to depreciate "redisp" and "redispatch" keywords as it is IMHO
better to use "option redispatch" which can be inverted.

Some useful documentation were added and at the same time I sorted
(alfabetically) all valid options both in the code and the documentation.

17 years ago[DOC] big update to the configuration manual
Willy Tarreau [Mon, 24 Dec 2007 15:55:16 +0000 (16:55 +0100)] 
[DOC] big update to the configuration manual

New in this version is a small intro to HTTP, then a detailed
explanation of the following keywords :

  acl, appsession, balance, bind, block, capture cookie,
  capture request header, capture response header, clitimeout,
  contimeout, cookie, default_backend, disabled, enabled, errorfile,
  http-check disable-on-404, monitor fail, option contstats,
  timeout client, timeout clitimeout, timeout connect,
  timeout contimeout.

Others will be alphabetically added.

17 years ago[BUG] hot reconfiguration failed because of a wrong error check
Willy Tarreau [Thu, 20 Dec 2007 22:05:50 +0000 (23:05 +0100)] 
[BUG] hot reconfiguration failed because of a wrong error check

The error check in return of start_proxies checked for exact ERR_RETRYABLE
but did not consider the return as a bit field. The function returned both
ERR_RETRYABLE and ERR_ALERT, hence the problem.

17 years ago[BUG] transparent proxy address was ignored in backend
Willy Tarreau [Fri, 14 Dec 2007 18:54:43 +0000 (19:54 +0100)] 
[BUG] transparent proxy address was ignored in backend

When the "source x.x.x.x usesrc y.y.y.y" statement was present in a
backend, the y.y.y.y address was fetched from the server instead of
the backend.

17 years ago[RELEASE] Released version 1.3.14 v1.3.14
Willy Tarreau [Thu, 6 Dec 2007 00:25:44 +0000 (01:25 +0100)] 
[RELEASE] Released version 1.3.14

Released version 1.3.14 with the following main changes :
    - New option http_proxy (Alexandre Cassen)
    - add support for "maxqueue" to limit server queue overload (Elijah Epifanov)
    - Check for duplicated conflicting proxies (Krzysztof Oledzki)
    - stats: report server and backend cumulated downtime (Krzysztof Oledzki)
    - use backends only with use_backend directive (Krzysztof Oledzki)
    - Handle long lines properly (Krzysztof Oledzki)
    - Implement and use generic findproxy and relax duplicated proxy check (Krzysztof Oledzki)
    - continous statistics (Krzysztof Oledzki)
    - add support for logging via a UNIX socket (Robert Tsai)
    - fix error checking in strl2ic/strl2uic()
    - fix calls to localtime()
    - provide easier-to-use ultoa_* functions
    - provide easy-to-use limit_r and LIM2A* macros
    - add a simple test for the status page
    - move error codes to common/errors.h
    - silent warning about LIST_* being redefined on OpenBSD
    - add socket address length to the protocols
    - group PR_O_BALANCE_* bits into a checkable value
    - externalize the "balance" option parser to backend.c
    - introduce the "url_param" balance method
    - make default_backend work in TCP mode too
    - disable warning about localtime_r on Solaris
    - adjust error messages about conflicting proxies
    - avoid calling some layer7 functions if not needed
    - simplify error path in event_accept()
    - add an options field to the listeners
    - added a new state to listeners
    - unbind_listener() must use fd_delete() and not close()
    - add a generic unbind_listener() primitive
    - add a generic delete_listener() primitive
    - add a generic unbind_all_listeners() primitive
    - create proto_tcp and move initialization of proxy listeners
    - stats: report numerical process ID, proxy ID and server ID
    - relative_pid was not initialized
    - missing header names in raw stats output
    - fix missing parenthesis in check_response_for_cacheability
    - small optimization on session_process_counters()
    - merge ebtree version 3.0
    - make ebtree headers multiple-include compatible
    - ebtree: include config.h for REGPRM*
    - differentiate between generic LB params and map-specific ones
    - add a weight divisor to the struct proxy
    - implement the Fast Weighted Round Robin (FWRR) algo
    - include filltab25.c to experiment on FWRR for dynamic weights
    - merge test-fwrr.cfg to validate dynamic weights
    - move the load balancing algorithm to be->lbprm.algo
    - change server check result to a bit field
    - implement "http-check disable-on-404" for graceful shutdown
    - secure the calling conditions of ->set_server_status_{up,down}
    - report disabled servers as "NOLB" when they are still UP
    - document the "http-check disable-on-404" option
    - http-check disable-on-404 is not limited to HTTP mode
    - add a test file for disable-on-404
    - use distinct bits per load-balancing algorithm type
    - implement the slowstart parameter for servers
    - document the server's slowstart parameter
    - stats: report the server warm up status in a "throttle" column
    - fix 2 minor issues on AIX
    - add the "nbsrv" ACL verb
    - add the "fail" condition to monitor requests
    - remove a warning from gcc due to htons() in standard.c
    - fwrr: ensure that we never overflow in placements
    - store the build options to report with -vv
    - fix the status return of the init script (R.I. Pienaar)
    - stats: real time monitoring script for unix socket (Prizee)
    - document "nbsrv" and "monitor fail"
    - restrict the set of allowed characters for identifiers
    - implement a time parsing function
    - add support for time units in the configuration
    - add a bit of documentation about timers
    - introduce separation between contimeout, and tarpit + queue
    - introduce the "timeout" keyword
    - grouped all timeouts in one structure
    - slowstart is in ms, not seconds
    - slowstart: ensure we don't start with a null weight
    - report the number of times each server was selected
    - fix build on AIX due to recent log changes
    - fix build on Solaris due to recent log changes

17 years ago[BUILD] fix build on Solaris due to recent log changes
Willy Tarreau [Wed, 5 Dec 2007 23:53:51 +0000 (00:53 +0100)] 
[BUILD] fix build on Solaris due to recent log changes

Solaris, as well as many other unixes doesn't know about sun_len
for UNIX domain sockets. It does not honnor the __SOCKADDR_COMMON
macro either. After looking at MacOS-X man (which is the same as
BSD man), OpenBSD man, and examples on the net, it appears that
those which support sun_len do not actually use it, or at least
ignore it as long as it's zero. Since all the sockaddr structures
are zeroed prior to being filled, it causes no problem not to set
sun_len, and this fixes build on other platforms.

Another problem on Solaris was that the "sun" name is already
defined as a macro returning a number, so it was necessary to
rename it.

17 years ago[BUILD] fix build on AIX due to recent log changes
Willy Tarreau [Wed, 5 Dec 2007 10:11:55 +0000 (11:11 +0100)] 
[BUILD] fix build on AIX due to recent log changes

17 years ago[MEDIUM] add support for logging via a UNIX socket
Robert Tsai [Wed, 5 Dec 2007 09:47:29 +0000 (10:47 +0100)] 
[MEDIUM] add support for logging via a UNIX socket

The code in haproxy-1.3.13.1 only supports syslogging to an internet
address. The attached patch:

 - Adds support for syslogging to a UNIX domain socket (e.g., /dev/log).
   If the address field begins with '/' (absolute file path), then
   AF_UNIX is used to construct the socket. Otherwise, AF_INET is used.

 - Achieves clean single-source build on both Mac OS X and Linux
   (sockaddr_in.sin_len and sockaddr_un.sun_len field aren't always present).

For handling sendto() failures in send_log(), it appears that the existing
code is fine (no need to close/recreate socket) for both UDP and UNIX-domain
syslog server. So I left things alone (did not close/recreate socket).
Closing/recreating socket after each failure would also work, but would lead
to increased amount of unnecessary socket creation/destruction if syslog is
temporarily unavailable for some reason (especially for verbose loggers).

Please consider this patch for inclusion into the upstream haproxy codebase.

17 years ago[STATS] report the number of times each server was selected
Willy Tarreau [Wed, 5 Dec 2007 09:34:49 +0000 (10:34 +0100)] 
[STATS] report the number of times each server was selected

One user reported that an indicator was missing in the statistics:
the number of times each server was selected by load balancing. It
is in fact the total number of sessions assigned to a server by the
load balancing algorithm. It should directly reflect the weight for
"fair" algorithms such as round-robin, since it will not account for
persistant connections.

It should help a lot tuning each server's weight depending on the
load it receives.

17 years ago[MEDIUM] slowstart: ensure we don't start with a null weight
Willy Tarreau [Mon, 3 Dec 2007 01:04:00 +0000 (02:04 +0100)] 
[MEDIUM] slowstart: ensure we don't start with a null weight

Because of a divide, it was possible to have a null weight during
a slowstart, which is pretty annoying, especially with a single
server and a long slowstart.

Also, fix the way we report the values in the stats page to avoid
confusion.

17 years ago[BUG] slowstart is in ms, not seconds
Willy Tarreau [Mon, 3 Dec 2007 00:51:45 +0000 (01:51 +0100)] 
[BUG] slowstart is in ms, not seconds

17 years ago[CLEANUP] grouped all timeouts in one structure
Willy Tarreau [Mon, 3 Dec 2007 00:38:36 +0000 (01:38 +0100)] 
[CLEANUP] grouped all timeouts in one structure

All known timeouts in a proxy have been grouped into a
"timeout" sub-structure.

17 years ago[MEDIUM] introduce the "timeout" keyword
Willy Tarreau [Mon, 3 Dec 2007 00:30:13 +0000 (01:30 +0100)] 
[MEDIUM] introduce the "timeout" keyword

A new "timeout" keyword replaces old "{con|cli|srv}timeout", and
provides the ability to independantly set the following timeouts :

  - client
  - tarpit
  - queue
  - connect
  - server
  - appsession

Additionally, the "clitimeout", "contimeout" and "srvtimeout" values
are supported but deprecated. No warning is emitted yet when they are
used since the option is very new.

Other timeouts should follow soon now.

17 years ago[MEDIUM] introduce separation between contimeout, and tarpit + queue
Willy Tarreau [Sun, 2 Dec 2007 23:36:16 +0000 (00:36 +0100)] 
[MEDIUM] introduce separation between contimeout, and tarpit + queue

Now the connect timeout, tarpit timeout and queue timeout are
distinct. In order to retain compatibility with older versions,
if either queue or tarpit is left unset both in the proxy and
in the default proxy, then it is inherited from the connect
timeout as before.

17 years ago[DOC] add a bit of documentation about timers
Willy Tarreau [Sun, 2 Dec 2007 21:27:38 +0000 (22:27 +0100)] 
[DOC] add a bit of documentation about timers

17 years ago[MEDIUM] add support for time units in the configuration
Willy Tarreau [Sun, 2 Dec 2007 21:15:14 +0000 (22:15 +0100)] 
[MEDIUM] add support for time units in the configuration

It is not always handy to manipulate large values exprimed
in milliseconds for timeouts. Also, some values are entered
in seconds (such as the stats refresh interval). This patch
adds support for time units. It knows about 'us', 'ms', 's',
'm', 'h', and 'd'. It automatically converts each value into
the caller's expected unit. Unit-less values are still passed
unchanged.

The unit must be passed as a suffix to the number. For instance:

     clitimeout 15m

If any character is not understood, an error is returned.

17 years ago[MINOR] implement a time parsing function
Willy Tarreau [Sun, 2 Dec 2007 21:00:35 +0000 (22:00 +0100)] 
[MINOR] implement a time parsing function

This new function accepts inputs in various default units, from
the microsecond to the day. It detects suffixes after numbers
and performs the appropriate conversions between the user's unit
and the program's unit, considering a unit-less number in the
default unit.

17 years ago[MEDIUM] restrict the set of allowed characters for identifiers
Willy Tarreau [Sun, 2 Dec 2007 17:45:09 +0000 (18:45 +0100)] 
[MEDIUM] restrict the set of allowed characters for identifiers

In order to avoid issues in the future, we want to restrict
the set of allowed characters for identifiers. Starting from
now, only A-Z, a-z, 0-9, '-', '_', '.' and ':' will be allowed
for a proxy, a server or an ACL name.

A test file has been added to check the restriction.

17 years ago[DOC] document "nbsrv" and "monitor fail"
Willy Tarreau [Sun, 2 Dec 2007 16:31:20 +0000 (17:31 +0100)] 
[DOC] document "nbsrv" and "monitor fail"

17 years ago[TESTS] stats: real time monitoring script for unix socket.
Willy Tarreau [Sun, 2 Dec 2007 13:11:36 +0000 (14:11 +0100)] 
[TESTS] stats: real time monitoring script for unix socket.

Julien Antony and Matthieu Huguet of Prizee provided this convenient
script to monitor activity via the unix socket. It requires presence
of the "socat" utility. Example of usage :

lb1:/home/scripts# ./stats_haproxy.sh -s prizee_media,FRONTEND
189 session/s (avg: 189 )       1040 concurrent sessions
182 session/s (avg: 185 )       1022 concurrent sessions
164 session/s (avg: 178 )       1015 concurrent sessions
175 session/s (avg: 177 )       1015 concurrent sessions
226 session/s (avg: 187 )       1031 concurrent sessions
252 session/s (avg: 198 )       1056 concurrent sessions
273 session/s (avg: 208 )       1072 concurrent sessions
268 session/s (avg: 216 )       1080 concurrent sessions
271 session/s (avg: 222 )       1131 concurrent sessions
241 session/s (avg: 224 )       1128 concurrent sessions
215 session/s (avg: 223 )       1136 concurrent sessions
206 session/s (avg: 221 )       1140 concurrent sessions

17 years ago[MINOR] fix the status return of the init script
Willy Tarreau [Sun, 2 Dec 2007 13:02:52 +0000 (14:02 +0100)] 
[MINOR] fix the status return of the init script

R.I. Pienaar reported to me that the init script provided with
haproxy did not correctly report the status of the rhstatus()
function. In fact this was caused by the "exit $RETVAL" instead
of "exit $?" at the end.

17 years ago[MINOR] store the build options to report with -vv
Willy Tarreau [Sun, 2 Dec 2007 10:28:59 +0000 (11:28 +0100)] 
[MINOR] store the build options to report with -vv

Sometimes it is useful to find out how a given binary version was
built. The build compiler and options are now provided for this,
and it's possible to get them with the -vv option.

17 years ago[CLEANUP] fwrr: ensure that we never overflow in placements
Willy Tarreau [Sun, 2 Dec 2007 10:01:23 +0000 (11:01 +0100)] 
[CLEANUP] fwrr: ensure that we never overflow in placements

Now we can compute the max place depending on the number of servers,
maximum weight and weight scale. The formula has been stored as a
comment so that it's easy to choose between smooth weight ramp up
and high number of servers. The default scale has been set to 16,
which permits 4000 servers with a granularity of 6% in the worst
case (weight=1).

17 years ago[CLEANUP] remove a warning from gcc due to htons() in standard.c
Willy Tarreau [Sun, 2 Dec 2007 09:55:56 +0000 (10:55 +0100)] 
[CLEANUP] remove a warning from gcc due to htons() in standard.c

Due to the fact that htons is defined as a macro, it's dangerous
to call it with auto-incremented arguments such as htons(f(++x)) :

src/standard.c: In function 'url2sa':
src/standard.c:291: warning: operation on 'curr' may be undefined

The solution is simply to store the intermediate result an pass it
to htons() at once.

17 years ago[MEDIUM] add the "fail" condition to monitor requests
Willy Tarreau [Fri, 30 Nov 2007 19:51:32 +0000 (20:51 +0100)] 
[MEDIUM] add the "fail" condition to monitor requests

Under certain circumstances, it is very useful to be able to fail some
monitor requests. One specific case is when the number of servers in
the backend falls below a certain level. The new "monitor fail" construct
followed by either "if"/"unless" <condition> makes it possible to specify
ACL-based conditions which will make the monitor return 503 instead of
200. Any number of conditions can be passed. Another use may be to limit
the requests to local networks only.

17 years ago[MEDIUM] add the "nbsrv" ACL verb
Willy Tarreau [Fri, 30 Nov 2007 19:48:53 +0000 (20:48 +0100)] 
[MEDIUM] add the "nbsrv" ACL verb

The new "nbsrv" ACL verb matches the number of active servers in a backend.
By default, it applies to the backend where it is declared, but optionally
it can receive the name of another backend as an argument in parenthesis.

It counts the number of enabled active servers first, then the number of
enabled backup servers.

17 years ago[BUILD] fix 2 minor issues on AIX
Willy Tarreau [Fri, 30 Nov 2007 17:38:35 +0000 (18:38 +0100)] 
[BUILD] fix 2 minor issues on AIX

AIX does not know about MSG_DONTWAIT. Fortunately, nearly all sockets
are already set to O_NONBLOCK, so it's not even required to change the
code.  It was only necessary to add this fcntl to the log socket which
lacked it.  The MSG_DONTWAIT value has been defined to zero when unset
in order to make the code cleaner and more portable.

Also, on AIX, "hz" is defined, which causes a problem with one function
parameter in time.c. It's enough to rename the parameter there. Last,
fix a missing #include <string.h> in proxy.c.

17 years ago[MINOR] stats: report the server warm up status in a "throttle" column
Willy Tarreau [Fri, 30 Nov 2007 17:16:29 +0000 (18:16 +0100)] 
[MINOR] stats: report the server warm up status in a "throttle" column

A new "throttle" column has been added to HTML and RAW stats to indicate
in percent, the level of throttling due to server warmup. The column is
empty at 100%.

17 years ago[DOC] document the server's slowstart parameter
Willy Tarreau [Fri, 30 Nov 2007 16:46:49 +0000 (17:46 +0100)] 
[DOC] document the server's slowstart parameter

17 years ago[MEDIUM] implement the slowstart parameter for servers
Willy Tarreau [Fri, 30 Nov 2007 16:42:05 +0000 (17:42 +0100)] 
[MEDIUM] implement the slowstart parameter for servers

The new 'slowstart' parameter for a server accepts a value in
milliseconds which indicates after how long a server which has
just come back up will run at full speed. The speed grows
linearly from 0 to 100% during this time. The limitation applies
to two parameters :

  - maxconn: the number of connections accepted by the server
    will grow from 1 to 100% of the usual dynamic limit defined
    by (minconn,maxconn,fullconn).

  - weight: when the backend uses a dynamic weighted algorithm,
    the weight grows linearly from 1 to 100%. In this case, the
    weight is updated at every health-check. For this reason, it
    is important that the 'inter' parameter is smaller than the
    'slowstart', in order to maximize the number of steps.

The slowstart never applies when haproxy starts, otherwise it
would cause trouble to running servers. It only applies when
a server has been previously seen as failed.

17 years ago[CLEANUP] use distinct bits per load-balancing algorithm type
Willy Tarreau [Fri, 30 Nov 2007 15:23:20 +0000 (16:23 +0100)] 
[CLEANUP] use distinct bits per load-balancing algorithm type

It's useful to be able to check against an LB algorithm type by
testing just one bit.

17 years ago[TESTS] add a test file for disable-on-404
Willy Tarreau [Fri, 30 Nov 2007 14:23:38 +0000 (15:23 +0100)] 
[TESTS] add a test file for disable-on-404

17 years ago[MINOR] http-check disable-on-404 is not limited to HTTP mode
Willy Tarreau [Fri, 30 Nov 2007 14:20:09 +0000 (15:20 +0100)] 
[MINOR] http-check disable-on-404 is not limited to HTTP mode

This option is for health-checks, do not limit it to HTTP proxies.

17 years ago[DOC] document the "http-check disable-on-404" option
Willy Tarreau [Fri, 30 Nov 2007 11:29:11 +0000 (12:29 +0100)] 
[DOC] document the "http-check disable-on-404" option

17 years ago[MEDIUM] report disabled servers as "NOLB" when they are still UP
Willy Tarreau [Fri, 30 Nov 2007 11:04:38 +0000 (12:04 +0100)] 
[MEDIUM] report disabled servers as "NOLB" when they are still UP

It's important to be able to distinguish between servers which are UP
and those which are UP but disabled via a 404 response. For this reason,
the status entries report "NOLB" instead of "UP", and the HTML page uses
darker colors. As a complement, write "DOWN" in bold red on the backend
if it has no server left for load balancing.

17 years ago[MEDIUM] secure the calling conditions of ->set_server_status_{up,down}
Willy Tarreau [Fri, 30 Nov 2007 10:11:02 +0000 (11:11 +0100)] 
[MEDIUM] secure the calling conditions of ->set_server_status_{up,down}

It's not always obvious for the callers of set_server_status_{up,down}
whether the new state really is up or down. Some flags as well as the
effective weight have to be considered. Let's ensure that those functions
perform the necessary check themselves so that if the state transition
cannot be performed, at least everything is updated as required.

17 years ago[MEDIUM] implement "http-check disable-on-404" for graceful shutdown
Willy Tarreau [Fri, 30 Nov 2007 09:41:39 +0000 (10:41 +0100)] 
[MEDIUM] implement "http-check disable-on-404" for graceful shutdown

When an HTTP server returns "404 not found", it indicates that at least
part of it is still running. For this reason, it can be convenient for
application administrators to be able to consider code 404 as valid,
but for a server which does not want to participate to load balancing
anymore. This is useful to seamlessly exclude a server from a farm
without acting on the load balancer. For instance, let's consider that
haproxy checks for the "/alive" file. To enable load balancing on a
server, the admin would simply do :

  # touch /var/www/alive

And to disable the server, he would simply do :

  # rm /var/www/alive

Another immediate gain from doing this is that it is now possible to
send NOTICE messages instead of ALERT messages when a server is first
disable, then goes down. This provides a graceful shutdown method.

To enable this behaviour, specify "http-check disable-on-404" in the
backend.

17 years ago[MEDIUM] change server check result to a bit field
Willy Tarreau [Fri, 30 Nov 2007 07:33:21 +0000 (08:33 +0100)] 
[MEDIUM] change server check result to a bit field

A server check currently returns either -1 or 1. This is not very
convenient to enhance the health-checks system. Let's use flags
instead.

17 years ago[MEDIUM] New option http_proxy
Alexandre Cassen [Thu, 29 Nov 2007 14:43:32 +0000 (15:43 +0100)] 
[MEDIUM] New option http_proxy

Hello,

You will find attached an updated release of previously submitted patch.
It polish some part and extend ACL engine to match IP and PORT parsed in
HTTP request. (and take care of comments made by Willy ! ;))

Best regards,
Alexandre

17 years ago[MINOR] move the load balancing algorithm to be->lbprm.algo
Willy Tarreau [Thu, 29 Nov 2007 14:38:04 +0000 (15:38 +0100)] 
[MINOR] move the load balancing algorithm to be->lbprm.algo

The number of possible options for a proxy has already reached
32, which is the current limit due to the fact that they are
each represented as a bit in a 32-bit word.

It's possible to move the load balancing algorithms to another
place. It will also save some space for future algorithms.

17 years ago[TESTS] merge test-fwrr.cfg to validate dynamic weights
Willy Tarreau [Mon, 26 Nov 2007 00:25:18 +0000 (01:25 +0100)] 
[TESTS] merge test-fwrr.cfg to validate dynamic weights

17 years ago[TESTS] include filltab25.c to experiment on FWRR for dynamic weights
Willy Tarreau [Mon, 26 Nov 2007 00:24:50 +0000 (01:24 +0100)] 
[TESTS] include filltab25.c to experiment on FWRR for dynamic weights

This is the 25th version of this test program. Merge it to ensure it
does not get lost.

17 years ago[MAJOR] implement the Fast Weighted Round Robin (FWRR) algo
Willy Tarreau [Mon, 26 Nov 2007 00:15:43 +0000 (01:15 +0100)] 
[MAJOR] implement the Fast Weighted Round Robin (FWRR) algo

This round robin algorithm was written from trees, so that we
do not have to recompute any table when changing server weights.
This solution allows on-the-fly weight adjustments with immediate
effect on the load distribution.

There is still a limitation due to 32-bit computations, to about
2000 servers at full scale (weight 255), or more servers with
lower weights. Basically, sum(srv.weight)*4096 must be below 2^31.

Test configurations and an example program used to develop the
tree will be added next.

Many changes have been brought to the weights computations and
variables in order to accomodate for the possiblity of a server to
be running but disabled from load balancing due to a null weight.

17 years ago[MINOR] add a weight divisor to the struct proxy
Willy Tarreau [Mon, 19 Nov 2007 18:10:18 +0000 (19:10 +0100)] 
[MINOR] add a weight divisor to the struct proxy

Under some circumstances, it will be useful to be able to have
a server's effective weight bigger than the user weight, and this
is particularly true for dynamic weight-based algorithms. In order
to support this, we add a "wdiv" member to the lbprm structure
which will always be used to divide the weights before reporting
them.

17 years ago[MEDIUM] differentiate between generic LB params and map-specific ones
Willy Tarreau [Thu, 15 Nov 2007 22:26:18 +0000 (23:26 +0100)] 
[MEDIUM] differentiate between generic LB params and map-specific ones

Since the introduction of server weights, all load balancing algorithms
relied on a pre-computed map. Incidently, quite a bunch of map-specific
parameters were used at random places in order to get the number of
servers or their total weight. It was not architecturally acceptable
that optimizations for the map computation had impact on external parts.
For instance, during this cleanup it was found that a backend weight was
seen as 1 when only the first backup server is used, whatever its weight.

This cleanup consists in differentiating between LB-generic parameters,
such as total weights, number of servers, etc... and map-specific ones.
The struct proxy has been enhanced in order to make it easier to later
support other algorithms. The recount_servers() function now also
updates generic values such as total weights so that it's not needed
anymore to call recalc_server_map() when weights are needed. This
permitted to simplify some code which does not need to know about map
internals anymore.

17 years ago[MEDIUM] ebtree: include config.h for REGPRM*
Willy Tarreau [Wed, 21 Nov 2007 09:34:15 +0000 (10:34 +0100)] 
[MEDIUM] ebtree: include config.h for REGPRM*

It's mandatory that all sources share the same defines for REGPRM*,
so let's include config.h for this.

17 years ago[BUILD] make ebtree headers multiple-include compatible
Willy Tarreau [Mon, 19 Nov 2007 17:43:04 +0000 (18:43 +0100)] 
[BUILD] make ebtree headers multiple-include compatible

ebtree did not support being included multiple times.

17 years ago[MINOR] merge ebtree version 3.0
Willy Tarreau [Thu, 15 Nov 2007 22:56:17 +0000 (23:56 +0100)] 
[MINOR] merge ebtree version 3.0

Version 3.0 of ebtree has been merged in but is not used yet.

17 years ago[OPTIM] small optimization on session_process_counters()
Willy Tarreau [Mon, 26 Nov 2007 19:15:35 +0000 (20:15 +0100)] 
[OPTIM] small optimization on session_process_counters()

It was possible to slightly reduce the size and the number of
operations in session_process_counters(). Two 64 bit comparisons
were removed, reducing the code by 98 bytes on x86 due to the lack
of registers. The net observed performance gain is almost 2%, which
cannot be attributed to those optimizations, but more likely to
induced changes in code alignment in other functions.

17 years ago[MEDIUM] continous statistics
Krzysztof Piotr Oledzki [Sat, 24 Nov 2007 21:12:47 +0000 (22:12 +0100)] 
[MEDIUM] continous statistics

By default, counters used for statistics calculation are incremented
only when a session finishes. It works quite well when serving small
objects, but with big ones (for example large images or archives) or
with A/V streaming, a graph generated from haproxy counters looks like
a hedgehog.

This patch implements a contstats (continous statistics) option.
When set counters get incremented continuously, during a whole session.
Recounting touches a hotpath directly so it is not enabled by default,
as it has small performance impact (~0.5%).

17 years ago[BUG] fix missing parenthesis in check_response_for_cacheability
Willy Tarreau [Sun, 25 Nov 2007 15:20:08 +0000 (16:20 +0100)] 
[BUG] fix missing parenthesis in check_response_for_cacheability

Parenthesis were missed when code was moved to this function.
This results in non-cacheable transactions not being ignored.

17 years ago[BUG] missing header names in raw stats output
Willy Tarreau [Mon, 26 Nov 2007 15:15:35 +0000 (16:15 +0100)] 
[BUG] missing header names in raw stats output

qlimit, pid, iid and sid were missing from the raw stats output

17 years ago[BUG] relative_pid was not initialized
Willy Tarreau [Mon, 26 Nov 2007 15:13:36 +0000 (16:13 +0100)] 
[BUG] relative_pid was not initialized

17 years ago[MINOR] stats: report numerical process ID, proxy ID and server ID
Willy Tarreau [Sun, 4 Nov 2007 22:35:08 +0000 (23:35 +0100)] 
[MINOR] stats: report numerical process ID, proxy ID and server ID

It is very convenient for SNMP monitoring to have unique process ID,
proxy ID and server ID. Those have been added to the CSV outputs.
The numbers start at 1. 0 is reserved. For servers, 0 means that the
reported name is not a server name but half a proxy (FRONTEND/BACKEND).

A remaining hidden "-" in the CSV output has been eliminated too.

17 years ago[MAJOR] create proto_tcp and move initialization of proxy listeners
Willy Tarreau [Mon, 29 Oct 2007 00:09:36 +0000 (01:09 +0100)] 
[MAJOR] create proto_tcp and move initialization of proxy listeners

Proxy listeners were very special and not very easy to manipulate.
A proto_tcp file has been created with all that is required to
manage TCPv4/TCPv6 as raw protocols, and provide generic listeners.

The code of start_proxies() and maintain_proxies() now looks less
like spaghetti. Also, event_accept will need a serious lifting in
order to use more of the information provided by the listener.

17 years ago[MINOR] add a generic unbind_all_listeners() primitive
Willy Tarreau [Sun, 28 Oct 2007 21:35:41 +0000 (22:35 +0100)] 
[MINOR] add a generic unbind_all_listeners() primitive

Most protocols will be able to share a single unbind_all_listeners()
primitive. Provide it in protocols.c.

17 years ago[MINOR] add a generic delete_listener() primitive
Willy Tarreau [Sun, 28 Oct 2007 21:26:05 +0000 (22:26 +0100)] 
[MINOR] add a generic delete_listener() primitive

Most protocols will be able to share a single delete_listener()
primitive. Provide it in protocols.c, and remove the specific
version from proto_uxst.

17 years ago[MINOR] add a generic unbind_listener() primitive
Willy Tarreau [Sun, 28 Oct 2007 21:13:50 +0000 (22:13 +0100)] 
[MINOR] add a generic unbind_listener() primitive

Most protocols will be able to share a single unbind_listener()
primitive. Provided it in protocols.c.

17 years ago[MEDIUM] unbind_listener() must use fd_delete() and not close()
Willy Tarreau [Sun, 28 Oct 2007 21:07:08 +0000 (22:07 +0100)] 
[MEDIUM] unbind_listener() must use fd_delete() and not close()

It is important that unbind_listener() calls fd_delete() to remove
a file descriptor, because only this one can update the fdtab and
the maxfd entries.

17 years ago[MAJOR] added a new state to listeners
Willy Tarreau [Sun, 28 Oct 2007 20:59:24 +0000 (21:59 +0100)] 
[MAJOR] added a new state to listeners

There was a missing state for listeners, when they are not listening
but still attached to the protocol. The LI_ASSIGNED state was added
for this purpose. This permitted to clean up the assignment/release
workflow quite a bit. Generic enable/enable_all/disable/disable_all
primitives were added, and a disable_all entry was added to the
struct protocol.

17 years ago[MINOR] add an options field to the listeners
Willy Tarreau [Sun, 28 Oct 2007 16:02:33 +0000 (17:02 +0100)] 
[MINOR] add an options field to the listeners

17 years ago[MEDIUM] simplify error path in event_accept()
Willy Tarreau [Sun, 4 Nov 2007 16:51:50 +0000 (17:51 +0100)] 
[MEDIUM] simplify error path in event_accept()

The error path in event_accept() was complicated by many code
duplications. Use the classical unrolling with the gotos. This
fix alone reduced the code by 2.5 kB.

17 years ago[MINOR] avoid calling some layer7 functions if not needed
Willy Tarreau [Sun, 4 Nov 2007 18:30:00 +0000 (19:30 +0100)] 
[MINOR] avoid calling some layer7 functions if not needed

Small optimization: in some cases, it's not interesting to call
functions which are dedicated to checking the cache headers or
cookies. Avoid calling them when not necessary.

17 years ago[MINOR] adjust error messages about conflicting proxies
Willy Tarreau [Sun, 4 Nov 2007 06:04:43 +0000 (07:04 +0100)] 
[MINOR] adjust error messages about conflicting proxies

It's not easy to report useful information to help the user quickly
fix a configuration. This patch :
  - removes the word "listener" in favor of "proxy" as it has been
    used since the beginning ;

  - ensures that the same function (hence the same words) will be
    used to report capabilities of a proxy being declared and an
    existing proxy ;

  - avoid the term "conflicting capabilities" in favor of "overlapping
    capabilities" which is more exact.

  - just report that the same name is reused in case of warnings

17 years ago[MEDIUM] Implement and use generic findproxy and relax duplicated proxy check
Krzysztof Piotr Oledzki [Sat, 3 Nov 2007 22:41:58 +0000 (23:41 +0100)] 
[MEDIUM] Implement and use generic findproxy and relax duplicated proxy check

This patch:
 - adds proxy_mode_str() similar to proxy_type_str()
 - adds a generic findproxy function used with default_backend/setbe/use_backed
 - rewrite default_backend/senbe/use_backed to use introduced findproxy()
 - relaxes duplicated proxy check
 - changes capabilities displaying from "%X" to "%s" with a call to proxy_type_str()

17 years ago[BUILD] disable warning about localtime_r on Solaris
Willy Tarreau [Sat, 3 Nov 2007 15:18:11 +0000 (16:18 +0100)] 
[BUILD] disable warning about localtime_r on Solaris

Solaris only declares localtime_r() if _REENTRANT is defined. Update
the makefile to silent the warning.

17 years ago[MEDIUM] make default_backend work in TCP mode too
Willy Tarreau [Sat, 3 Nov 2007 13:28:39 +0000 (14:28 +0100)] 
[MEDIUM] make default_backend work in TCP mode too

The default_backend did not work in TCP mode since there was no
header state to assign the backend. This causes much trouble when
configs are created by copy-paste.

The solution was to fix the way the backend is assigned upon accept().
A wrong contimeout assignment was fixed too.

17 years ago[MEDIUM] introduce the "url_param" balance method
Willy Tarreau [Thu, 1 Nov 2007 21:48:15 +0000 (22:48 +0100)] 
[MEDIUM] introduce the "url_param" balance method

Some applications do not have a strict persistence requirement, yet
it is still desirable for performance considerations, due to local
caches on the servers. For some reasons, there are some applications
which cannot rely on cookies, and for which the last resort is to use
a parameter passed in the URL.

The new 'url_param' balance method is there to solve this issue. It
accepts a parameter name which is looked up from the URL and which
is then hashed to select a server. If the parameter is not found,
then the round robin algorithm is used in order to provide a normal
load balancing across the servers for the first requests. It would
have been possible to use a source IP hash instead, but since such
applications are generally buried behind multiple levels of
reverse-proxies, it would not provide a good balance.

The doc has been updated, and two regression testing configurations
have been added.

17 years ago[MINOR] externalize the "balance" option parser to backend.c
Willy Tarreau [Thu, 1 Nov 2007 20:39:54 +0000 (21:39 +0100)] 
[MINOR] externalize the "balance" option parser to backend.c

A new function "backend_parse_balance" has been created in backend.c,
which is dedicated to the parsing of the "balance" keyword. It will
provide easier methods for adding new algorithms.

17 years ago[CLEANUP] group PR_O_BALANCE_* bits into a checkable value
Willy Tarreau [Thu, 1 Nov 2007 20:08:19 +0000 (21:08 +0100)] 
[CLEANUP] group PR_O_BALANCE_* bits into a checkable value

In preparation for newer balance algorithms, group the
sparse PR_O_BALANCE_* values into layer4 and layer7-based
algorithms. This will ease addition of newer algorithms.

17 years ago[MEDIUM] Handle long lines properly
Krzysztof Piotr Oledzki [Wed, 31 Oct 2007 23:33:12 +0000 (00:33 +0100)] 
[MEDIUM] Handle long lines properly

Currently, there is a hidden line length limit in the haproxy, set
to 256-1 chars. With large acls (for example many hdr(host) matches)
it may be not enough and which is even worse, error message may
be totally confusing as everything above this limit is treated
as a next line:

echo -ne "frontend aqq 1.2.3.4:80\nmode http\nacl e hdr(host) -i X X X X X X X www.xx.example.com stats\n"|
 sed s/X/www.some-host-name.example.com/g > ha.cfg && haproxy -c -f ./ha.cfg

[WARNING] 300/163906 (11342) : parsing [./ha.cfg:4] : 'stats' ignored because frontend 'aqq' has no backend capability.

Recently I hit simmilar problem and it took me a while to find why
requests for "stats" are not handled properly.

This patch:
 - makes the limit configurable (LINESIZE)
 - increases default line length limit from 256 to 2048
 - increases MAX_LINE_ARGS from 40 to 64
 - fixes hidden assignment in fgets()
 - moves arg/end/args/line inside the loop, making code auditing easier
 - adds a check that shows error if the limit is reached
 - changes "*line++ = 0;" to "*line++ = '\0';" (cosmetics)

With this patch, when LINESIZE is defined to 256, above example produces:
[ALERT] 300/164724 (27364) : parsing [/tmp/ha.cfg:3]: line too long, limit: 255.
[ALERT] 300/164724 (27364) : Error reading configuration file : /tmp/ha.cfg

17 years ago[PATCH] use backends only with use_backend directive
Krzysztof Oledzki [Wed, 31 Oct 2007 08:07:24 +0000 (09:07 +0100)] 
[PATCH] use backends only with use_backend directive

Hello,

As it is possible to use the same name for two proxies, make sure that
use_backed & friends does not match wrong proxy when used with use_backend/
default_backend/setbe. For example, without this patch, when there is a
backend and frontend with the same name (first backend and then frontend
trying to use specific backend), the application will likely try to use
frontend instead of backend, complaining loudly about a loop.

Best regards,

                                 Krzysztof Oledzki

17 years ago[MINOR] add socket address length to the protocols
Willy Tarreau [Sun, 28 Oct 2007 11:09:45 +0000 (12:09 +0100)] 
[MINOR] add socket address length to the protocols

The protocol struct can be more useful if it also provides
address lengths. Add sock_addrlen, as used by bind(), as
well as l3_addrlen for hashes.

17 years ago[CLEANUP] silent warning about LIST_* being redefined on OpenBSD
Willy Tarreau [Sun, 28 Oct 2007 10:41:06 +0000 (11:41 +0100)] 
[CLEANUP] silent warning about LIST_* being redefined on OpenBSD

Building ev_kqueue on OpenBSD causes some warnings to occur,
because OpenBSD also uses LIST_* macros in sys/queue.h, included
from sys/event.h. Simply undefine those macros since we don't
need them.

17 years ago[MINOR] move error codes to common/errors.h
Willy Tarreau [Sun, 28 Oct 2007 10:14:07 +0000 (11:14 +0100)] 
[MINOR] move error codes to common/errors.h

It's useful to be able to share error codes between C files,
so move the codes currently only used in protocols to a generic
file.

17 years ago[TESTS] add a simple test for the status page
Willy Tarreau [Thu, 25 Oct 2007 18:17:40 +0000 (20:17 +0200)] 
[TESTS] add a simple test for the status page

17 years ago[MEDIUM] add support for "maxqueue" to limit server queue overload
Elijah Epifanov [Thu, 25 Oct 2007 18:15:38 +0000 (20:15 +0200)] 
[MEDIUM] add support for "maxqueue" to limit server queue overload

This patch adds the "maxqueue" parameter to the server. This allows new
sessions to be immediately rebalanced when the server's queue is filled.
It's useful when session stickiness is just a performance boost (even a
huge one) but not a requirement.

This should only be used if session affinity isn't a hard functional
requirement but provides performance boost by keeping server-local
caches hot and compact).

Absence of 'maxqueue' option means unlimited queue. When queue gets filled
up to 'maxqueue' client session is moved from server-local queue to a global
one.

17 years ago[MINOR] provide easy-to-use limit_r and LIM2A* macros
Willy Tarreau [Thu, 25 Oct 2007 14:58:42 +0000 (16:58 +0200)] 
[MINOR] provide easy-to-use limit_r and LIM2A* macros

This is in fact the same as ultoa() except that it's possible to
pass the string to be returned in case the value is NULL. This is
useful to report limits in printf calls.

17 years ago[MINOR] provide easier-to-use ultoa_* functions
Willy Tarreau [Thu, 25 Oct 2007 10:14:10 +0000 (12:14 +0200)] 
[MINOR] provide easier-to-use ultoa_* functions

Current ultoa() function is limited to one use per expression or
function call. Sometimes this is limitating. Change this in favor
of an array of 10 return values and shorter macros U2A0..U2A9
which respectively call the function with the 10 different buffers.

17 years ago[BUG] fix calls to localtime()
Willy Tarreau [Thu, 25 Oct 2007 08:34:16 +0000 (10:34 +0200)] 
[BUG] fix calls to localtime()

localtime() was called with pointers to tv_sec, which is time_t on
some platforms and long on others. A problem was encountered on
Sparc64 under OpenBSD where tv_sec is long (64 bits) and time_t is
32 bits. Since this architecture is big-endian, it exhibited the
bug because localtime() always worked with the high part of the
value which is always zero. This problem was identified and debugged
by Thierry Fournier.

The correct solution is to pass the date by value and not by pointer,
through an intermediate function. The use of localtime_r() instead of
localtime() also made it possible to get rid of the first call to
localtime() since it does not need to allocate memory anymore.

17 years ago[BUG] fix error checking in strl2ic/strl2uic()
Willy Tarreau [Thu, 25 Oct 2007 07:42:24 +0000 (09:42 +0200)] 
[BUG] fix error checking in strl2ic/strl2uic()

The strl2ic() and strl2uic() primitives used to convert string to
integers could return 10 times the value read if they stopped on
non-digit because of a mis-placed loop exit.

17 years ago[MEDIUM] stats: report server and backend cumulated downtime
Krzysztof Oledzki [Mon, 22 Oct 2007 14:21:10 +0000 (16:21 +0200)] 
[MEDIUM] stats: report server and backend cumulated downtime

Hello,

This patch implements new statistics for SLA calculation by adding new
field 'Dwntime' with total down time since restart (both HTTP/CSV) and
extending status field (HTTP) or inserting a new one (CSV) with time
showing how long each server/backend is in a current state. Additionaly,
down transations are also calculated and displayed for backends, so it is
possible to know how many times selected backend was down, generating "No
server is available to handle this request." error.

New information are presentetd in two different ways:
   - for HTTP: a "human redable form", one of "100000d 23h", "23h 59m" or
      "59m 59s"
   - for CSV: seconds

I believe that seconds resolution is enough.

As there are more columns in the status page I decided to shrink some
names to make more space:
   - Weight -> Wght
   - Check -> Chk
   - Down -> Dwn

Making described changes I also made some improvements and fixed some
small bugs:
   - don't increment s->health above 's->rise + s->fall - 1'. Previously it
     was incremented an then (re)set to 's->rise + s->fall - 1'.
   - do not set server down if it is down already
   - do not set server up if it is up already
   - fix colspan in multiple places (mostly introduced by my previous patch)
   - add missing "status" header to CSV
   - fix order of retries/redispatches in server (CSV)
   - s/Tthen/Then/
   - s/server/backend/ in DATA_ST_PX_BE (dumpstats.c)

Changes from previous version:
  - deal with negative time intervales
  - don't relay on s->state (SRV_RUNNING)
  - little reworked human_time + compacted format (no spaces). If needed it
    can be used in the future for other purposes by optionally making "cnt"
    as an argument
  - leave set_server_down mostly unchanged
  - only little reworked "process_chk: 9"
  - additional fields in CSV are appended to the rigth
  - fix "SEC" macro
  - named arguments (human_time, be_downtime, srv_downtime)

Hope it is OK. If there are only cosmetic changes needed please fill free
to correct it, however if there are some bigger changes required I would
like to discuss it first or at last to know what exactly was changed
especially since I already put this patch into my production server. :)

Thank you,

Best regards,

  Krzysztof Oledzki

17 years ago[PATCH]: Check for duplicated conflicting proxies
Krzysztof Oledzki [Sun, 21 Oct 2007 00:55:17 +0000 (02:55 +0200)] 
[PATCH]: Check for duplicated conflicting proxies

Currently haproxy accepts a config with duplicated proxies
(listen/fronted/backed/ruleset). This patch fix this, so the application
will complain when there is an error.

With this modification it is still possible to use the same name for two
proxies (for example frontend&backend) as long there is no conflict:

                 listen backend frontend ruleset
listen             -      -       -        -
backend            -      -       OK       -
frontend           -      OK      -        -
ruleset            -      -       -        -

Best regards,

  Krzysztof Oledzki

17 years ago[MINOR] stats: update the width of the table to 22 columns
Willy Tarreau [Fri, 19 Oct 2007 04:23:19 +0000 (06:23 +0200)] 
[MINOR] stats: update the width of the table to 22 columns

Unfortunately, we forgot to increase the table from 20 to 22 cols when
we added retries and redisp.

17 years ago[RELEASE] Released version 1.3.13 with the following main changes : v1.3.13
Willy Tarreau [Thu, 18 Oct 2007 20:38:22 +0000 (22:38 +0200)] 
[RELEASE] Released version 1.3.13 with the following main changes :
    - replace the code under O'Reilly license (Arnaud Cornet)
    - add a small man page (Arnaud Cornet)
    - stats: report haproxy's version by default (Krzysztof Oledzki)
    - stats: count server retries and redispatches (Krzysztof Oledzki)
    - core: added easy support for Doug Lea's malloc (dlmalloc)
    - core: fade out memory usage when stopping proxies
    - core: moved the sockaddr pointer to the fdtab structure
    - core: add generic protocol support
    - core: implement client-side support for PF_UNIX sockets
    - stats: implement the CSV output
    - stats: add a link to the CSV export HTML page
    - stats: implement the statistics output on a unix socket
    - config: introduce the "stats" keyword in global section
    - build: centralize version and date into one file for each
    - tests: added a new hash algorithm

17 years ago[MEDIUM] stats: count server retries and redispatches
Krzysztof Oledzki [Thu, 18 Oct 2007 17:12:30 +0000 (19:12 +0200)] 
[MEDIUM] stats: count server retries and redispatches

It is important to know how your installation performs. Haproxy masks
connection errors, which is extremely good for a client but it is bad for
an administrator (except people believing that "ignorance is a bless").

Attached patch adds retries and redispatches counters, so now haproxy:

1. For server:
 - counts retried connections (masked or not)

2. For backends:
 - counts retried connections (masked or not) that happened to
    a slave server
 - counts redispatched connections
 - does not count successfully redispatched connections as backend errors.
    Errors are increased only when client does not get a valid response,
    in other words: with failed redispatch or when this function is not
    enabled.

3. For statistics:
 - display Retr (retries) and Redis (redispatches) as a "Warning"
   information.

17 years ago[MINOR] use nolinger on health-checks if backend is set to nolinger
Willy Tarreau [Thu, 18 Oct 2007 16:07:48 +0000 (18:07 +0200)] 
[MINOR] use nolinger on health-checks if backend is set to nolinger

If the administrator finds it useful to disable lingering on the backend,
let's disable lingering on health-checks too.

17 years ago[BUG] scope "." must match the backend and not the frontend
Willy Tarreau [Thu, 18 Oct 2007 14:38:37 +0000 (16:38 +0200)] 
[BUG] scope "." must match the backend and not the frontend

17 years ago[BUG] fix off-by-one in path length in destroy_uxst_socket()
Willy Tarreau [Thu, 18 Oct 2007 14:15:52 +0000 (16:15 +0200)] 
[BUG] fix off-by-one in path length in destroy_uxst_socket()

An off-by-one error was left in the computation of the unix socket path.

17 years ago[BUILD] fix build of global section with older gcc versions
Willy Tarreau [Thu, 18 Oct 2007 13:15:57 +0000 (15:15 +0200)] 
[BUILD] fix build of global section with older gcc versions

The way the global section was initialized was not correct, which
made older versions of GCC complain.

17 years ago[MEDIUM] introduce the "stats" keyword in global section
Willy Tarreau [Thu, 18 Oct 2007 11:53:22 +0000 (13:53 +0200)] 
[MEDIUM] introduce the "stats" keyword in global section

Removed old unused MODE_LOG and MODE_STATS, and replaced the "stats"
keyword in the global section. The new "stats" keyword in the global
section is used to create a UNIX socket on which the statistics will
be accessed.  The client must issue a "show stat\n" command in order
to get a CSV-formated output similar to the output on the HTTP socket
in CSV mode.

17 years ago[MEDIUM] implement the statistics output on a unix socket
Willy Tarreau [Wed, 17 Oct 2007 16:57:38 +0000 (18:57 +0200)] 
[MEDIUM] implement the statistics output on a unix socket

A unix socket can now access the statistics. It currently only
recognizes the "show stat\n" command at the beginning of the
input, then returns the statistics in CSV format.

17 years ago[MINOR] add a link to the CSV export on the stats page.
Willy Tarreau [Thu, 18 Oct 2007 09:05:48 +0000 (11:05 +0200)] 
[MINOR] add a link to the CSV export on the stats page.

17 years ago[MEDIUM] implement the CSV output for the statistics
Willy Tarreau [Wed, 17 Oct 2007 16:44:57 +0000 (18:44 +0200)] 
[MEDIUM] implement the CSV output for the statistics

It is now possible to get CSV ouput from the statistics by
simply appending ";csv" to the HTTP request sent to get the
stats. The fields keep the same ordering as in the HTML page,
and a field "pxname" has been prepended at the beginning of
the line.

17 years ago[MEDIUM] moved stats and buffer generic functions to new files
Willy Tarreau [Wed, 17 Oct 2007 15:06:05 +0000 (17:06 +0200)] 
[MEDIUM] moved stats and buffer generic functions to new files

Neither the primitives used to write data to a buffer, nor the stats
dump functions are HTTP-specific anymore. Move them to dedicated
files

17 years ago[MINOR] make it possible to set unix socket permissions
Willy Tarreau [Thu, 18 Oct 2007 10:45:54 +0000 (12:45 +0200)] 
[MINOR] make it possible to set unix socket permissions

Under most systems, it is possible to set permissions on unix
sockets. This has been added to the listeners and to unix
sockets.

17 years ago[MAJOR] implemented client-side support for PF_UNIX sockets
Willy Tarreau [Tue, 16 Oct 2007 15:34:28 +0000 (17:34 +0200)] 
[MAJOR] implemented client-side support for PF_UNIX sockets

A new file, proto_uxst.c, implements support of PF_UNIX sockets
of type SOCK_STREAM. It relies on generic stream_sock_read/write
and uses its own accept primitive which also tries to be generic.

Right now it only implements an echo service in sight of a general
support for start dumping via unix socket. The echo code is more
of a proof of concept than useful code.