Commit Graph

517 Commits

Author SHA1 Message Date
Willy Tarreau
d2a4aa2c09 [DOC] applied small fixes from early readers 2008-02-13 00:53:50 +01:00
Willy Tarreau
af85d944ea [DOC] fix erroneous "useallbackups" option in the doc 2008-02-13 00:53:45 +01:00
Willy Tarreau
41a340d7c8 [DOC] minor cleanup of the doc and notice to contributors 2008-01-22 12:25:31 +01:00
Krzysztof Piotr Oledzki
5259dfedd1 [MEDIUM]: rework checks handling
This patch adds two new variables: fastinter and downinter.
When server state is:
 - non-transitionally UP -> inter (no change)
 - transitionally UP (going down), unchecked or transitionally DOWN (going up) -> fastinter
 - down -> downinter

It allows to set something like:
        server sr6 127.0.51.61:80 cookie s6 check inter 10000 downinter 20000 fastinter 500 fall 3 weight 40
In the above example haproxy uses 10000ms between checks but as soon as
one check fails fastinter (500ms) is used. If server is down
downinter (20000) is used or fastinter (500ms) if one check pass.
Fastinter is also used when haproxy starts.

New "timeout.check" variable was added, if set haproxy uses it as an additional
read timeout, but only after a connection has been already established. I was
thinking about using "timeout.server" here but most people set this
with an addition reserve but still want checks to kick out laggy servers.
Please also note that in most cases check request is much simpler
and faster to handle than normal requests so this timeout should be smaller.

I also changed the timeout used for check connections establishing.

Changes from the previous version:
 - use tv_isset() to check if the timeout is set,
 - use min("timeout connect", "inter") but only if "timeout check" is set
   as this min alone may be to short for full (connect + read) check,
 - debug code (fprintf) commented/removed
 - documentation

Compile tested only (sorry!) as I'm currently traveling but changes
are rather small and trivial.
2008-01-22 11:29:06 +01:00
Willy Tarreau
ced27013b6 [DOC] added documentation about HTTP header manipulations
This section has been inserted before the logging section.
2008-01-17 20:35:34 +01:00
Willy Tarreau
303c035725 [DOC] document all req* and rsp* keywords. 2008-01-17 19:01:39 +01:00
Willy Tarreau
198a744e1d [DOC] all server parameters have been documented 2008-01-17 12:05:32 +01:00
Willy Tarreau
eabeafaa21 [DOC] added "server", "source" and "stats" keywords
The documentation now lists all keywords except the req* and rsp*. The
"server" keyword has been documented for mandatory parameters. Specific
settings are still waiting to be written in a dedicated section.
2008-01-16 16:17:06 +01:00
Willy Tarreau
b1e52e8c44 [MEDIUM] support fully transparent proxy on Linux (USE_LINUX_TPROXY)
Using some Linux kernel patches, it is possible to redirect non-local
traffic to local sockets when IP forwarding is enabled. In order to
enable this option, we introduce the "transparent" option keyword on
the "bind" command line. It will make the socket reachable by remote
sources even if the destination address does not belong to the machine.
2008-01-13 14:49:51 +01:00
Willy Tarreau
844e3c53da [DOC] added documentation for "option tcplog" to "use_backend"
- options tcplog, tcpsplice and transparent have been documented.
- keywords "srvtimeout", "timeout queue", "timeout server" and
  "timeout tarpit" have been documented
- keywords "transparent" and "use_backend" have been documented

Only "server", "source" and "stats *" remain undocumented
2008-01-11 16:28:18 +01:00
Willy Tarreau
a453bddac2 [DOC] document options nolinger to ssl-hello-chk
Options nolinger, persist, smtpchk and ssl-hello-chk have been
documented. All keywords and options up to and including option
tcpka are now documented.
2008-01-08 19:50:52 +01:00
Krzysztof Piotr Oledzki
25b501a6b1 [MEDIUM]: Count retries and redispatches also for servers, fix redistribute_pending, extend logs, %d->%u cleanup
This patch extends a little previously added functionality to also
count retries and redispatches for servers. Now it is possible to know
which server causes redispatches as it is not always the same that takes
most retries.

While working with the code I found that redistribute_pending() does not increment
srv->redispatches && be->redispatches. I don't know how to test it but
I think the fix is correct. If not I can withdraw it.

I also extended logs to show how many retries were done and if redispatching
was necessary ('+'). I'm using an additional session flag SN_REDISP to match
redispatched connections. I had to rearrange all defines in session.h to make
more room for it.

The documentation about logs was also fixed a little (sorry, english only),
as current version uses totally different format. BTW: examples are still
outdated, maybe next time...

Finally, I changed %d -> %u for retries/redispatches as those variables
are declared as unsigned.
2008-01-06 16:43:05 +01:00
Willy Tarreau
51c9bde060 [MINOR] tarpit timeout is also allowed in backends
Since the tarpit action may be set in backends too, its timeout
must be configurable there.
2008-01-06 13:40:03 +01:00
Willy Tarreau
036fae0ec9 [MEDIUM] introduce "timeout http-request" in frontends
In order to offer DoS protection, it may be required to lower the maximum
accepted time to receive a complete HTTP request without affecting the client
timeout. This helps protecting against established connections on which
nothing is sent. The client timeout cannot offer a good protection against
this abuse because it is an inactivity timeout, which means that if the
attacker sends one character every now and then, the timeout will not
trigger. With the HTTP request timeout, no matter what speed the client
types, the request will be aborted if it does not complete in time.
2008-01-06 13:24:40 +01:00
Willy Tarreau
a0250ba38d [OPTIM] introduce global parameter "tune.maxaccept"
This new parameter makes it possible to override the default
number of consecutive incoming connections which can be
accepted on a socket. By default it is not limited on single
process mode, and limited to 8 in multi-process mode.
2008-01-06 11:22:57 +01:00
Willy Tarreau
c73ce2b111 [MINOR] add support for the "backlog" parameter
Add the "backlog" parameter to frontends, to give hints to
the system about the approximate listen backlog desired size.

In order to protect against SYN flood attacks, one solution is
to increase the system's SYN backlog size. Depending on the
system, sometimes it is just tunable via a system parameter,
sometimes it is not adjustable at all, and sometimes the system
relies on hints given by the application at the time of the
listen() syscall. By default, HAProxy passes the frontend's
maxconn value to the listen() syscall. On systems which can
make use of this value, it can sometimes be useful to be able
to specify a different value, hence this backlog parameter.
2008-01-06 10:55:10 +01:00
Willy Tarreau
c27debfe56 [DOC] document options forwardfor to logasap
Options forwardfor, http_proxy, httpchk, httpclose, httplog and logasap
have been documented.
2008-01-06 08:57:02 +01:00
Willy Tarreau
a8efd362b2 [STATS] add support for "show info" on the unix socket
It is sometimes required to know some informations such as the
process uptime when consulting statistics. This patch adds the
"show info" command to query those informations on the UNIX
socket.
2008-01-03 10:19:15 +01:00
Willy Tarreau
bf1f816ecf [DOC] document more options
All options up to and including "forceclose" have been documented.
2007-12-28 17:42:56 +01:00
Willy Tarreau
2769aa050a [DOC] large update to the configuration manual
Keywords from "errorloc" to "monitor-uri" inclusive have been added.
Some fixes applied too.
2007-12-27 18:26:09 +01:00
Krzysztof Oledzki
336d475d13 [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.
2007-12-27 11:52:06 +01:00
Willy Tarreau
0ba2750591 [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.
2007-12-24 16:55:16 +01:00
Robert Tsai
81ae1953bf [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.
2007-12-05 10:47:29 +01:00
Willy Tarreau
e219db7a46 [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.
2007-12-03 01:30:13 +01:00
Willy Tarreau
befdff11aa [DOC] add a bit of documentation about timers 2007-12-02 22:27:38 +01:00
Willy Tarreau
c7246fcdf3 [DOC] document "nbsrv" and "monitor fail" 2007-12-02 17:31:20 +01:00
Willy Tarreau
5764b38c38 [DOC] document the server's slowstart parameter 2007-11-30 17:46:49 +01:00
Willy Tarreau
dbc36f6e44 [DOC] document the "http-check disable-on-404" option 2007-11-30 12:29:11 +01:00
Alexandre Cassen
5eb1a9033a [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
2007-11-29 15:43:32 +01:00
Willy Tarreau
f56fd8a285 [BUILD] make ebtree headers multiple-include compatible
ebtree did not support being included multiple times.
2007-11-28 14:23:05 +01:00
Willy Tarreau
e6d2e4dbdf [MINOR] merge ebtree version 3.0
Version 3.0 of ebtree has been merged in but is not used yet.
2007-11-28 14:20:44 +01:00
Krzysztof Piotr Oledzki
583bc96606 [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%).
2007-11-26 20:21:47 +01:00
Willy Tarreau
0173280bfa [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.
2007-11-01 23:05:09 +01:00
Elijah Epifanov
acafc5f88c [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.
2007-10-25 20:15:38 +02:00
Willy Tarreau
fbee71331d [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.
2007-10-18 14:16:11 +02:00
Krzysztof Oledzki
d9db9274fe [MINOR] report haproxy's version by default on the stats page
For people who manage many haproxies, it is sometimes convenient
to be informed of their version. This patch adds this, with the
option to disable this report by specifying "stats hide-version".

Also, the feature may be permanently disabled by setting the
STATS_VERSION_STRING to "" (empty string), or the format can
simply be adjusted.
2007-10-15 10:05:11 +02:00
Willy Tarreau
fe255b7061 [DOC] document spread-checks 2007-10-15 09:33:20 +02:00
Alexandre Cassen
87ea548313 [MINOR] add the "nolinger" option to disable data lingering
The following patch will give the ability to tweak socket linger mode.
You can use this option with "option nolinger" inside fronted or backend
configuration declaration.

This will help in environments where lots of FIN_WAIT sockets are
encountered.
2007-10-15 09:33:06 +02:00
Willy Tarreau
10806d50da [DOC] fixed 2 typos in haproxy-en/fr
-st was indicated instead of -sf, and the pidfile was wrong.
2007-09-09 23:49:18 +02:00
Willy Tarreau
031a26b4a7 [DOC] added a small man page
Arnaud Cornet has started a small man page based on some information
gathered from the docs. I've completed it a bit.
2007-09-09 22:40:07 +02:00
Willy Tarreau
bbd42123e1 [MINOR] add support for "stats refresh <interval>"
Sometimes it may be desirable to automatically refresh the
stats page. Most browsers support the "Refresh:" header with
an interval in seconds. Specifying "stats refresh xxx" will
automatically add this header.
2007-09-09 21:09:28 +02:00
Willy Tarreau
24e779b71d [DOC] the "stats" keyword is not allowed in a pure frontend. 2007-09-09 21:09:28 +02:00
Willy Tarreau
6a06a40501 [DOC] started a new configuration manual
This new configuration manual intends to document every known keyword
of the configuration language. Right now, it enumerates them all and
describes how to use ACLs.
2007-09-09 21:09:28 +02:00
Willy Tarreau
3f49b30284 [MEDIUM] errorfile: use a local file to feed error messages
It is now possible to read error messages from local files,
using the 'errorfile' keyword. Those files are read during
parsing, so there's no I/O involved. They make it possible
to return custom error messages with custom status and headers.
2007-06-11 00:29:26 +02:00
Willy Tarreau
ae8b796722 [MEDIUM] smarter integer comparison support in ACLs
ACLs now support operators such as 'eq', 'le', 'lt', 'ge' and 'gt'
in order to give more flexibility to the language. Because of this
change, the 'dst_limit' keyword changed to 'dst_conn' and now requires
either a range or a test such as 'dst_conn lt 1000' which is more
understandable.
2007-06-09 23:10:04 +02:00
Willy Tarreau
1db37710dc [MEDIUM] limit the number of events returned by *poll*
By default, epoll/kqueue used to return as many events as possible.
This could sometimes cause huge latencies (latencies of up to 400 ms
have been observed with many thousands of fds at once). Limiting the
number of events returned also reduces the latency by avoiding too
many blind processing. The value is set to 200 by default and can be
changed in the global section using the tune.maxpollevents parameter.
2007-06-03 17:16:49 +02:00
Willy Tarreau
726c2bf645 [DOC] add some documentation about ACLs
Minimal documentation about ACLs
2007-05-09 01:31:45 +02:00
Willy Tarreau
23677908dd [MEDIUM] implement SMTP health checks
Peter van Dijk contributed this patch which implements the "smtpchk"
option, which is to SMTP what "httpchk" is to HTTP. By default, it sends
"HELO localhost" to the servers, and waits for the 250 message, but it
can also send a specific request.
2007-05-08 23:50:35 +02:00
Willy Tarreau
2fcb500481 [MEDIUM] implement the URI hash algorithm
Guillaume Dallaire contributed the URI hashing algorithm for
use with proxy-caches. It provides the advantage of optimizing
the cache hit rate.
2007-05-08 14:05:27 +02:00
Willy Tarreau
6996e15e16 [BUG] fixed connection establishment detection
Since the introduction of speculative I/O, it was not always possible
to correctly detect a connection establishment. Particularly, in TCP
mode, there is no data to send and getsockopt() returns no error. The
solution consists in trying a connect() again to get its diagnostic.
2007-04-30 14:37:43 +02:00
Willy Tarreau
de99e99ecf [MAJOR] introduced speculative I/O with epoll()
The principle behind speculative I/O is to speculatively try to
perform I/O before registering the events in the system. This
considerably reduces the number of calls to epoll_ctl() and
sometimes even epoll_wait(), and manages to increase overall
performance by about 10%.

The new poller has been called "sepoll". It is used by default
on Linux when it works. A corresponding option "nosepoll" and
the command line argument "-ds" allow to disable it.
2007-04-16 00:53:59 +02:00
Willy Tarreau
985fc56734 [DOC] added some docs about http headers storage and acls 2007-04-01 09:44:10 +02:00
Willy Tarreau
2ea3abb7bf [MEDIUM] add support for health-checks on other addresses
Patch from Fabrice Dulaunoy. Explanation below, and script
merged in examples/.

This patch allow to put a different address in the check part for each
server (and not only a specific port)

I need this feature because I've a complex settings where, when a specific
farm goes down, I need to switch a set of other farm either if these other
farm behave perfectly well.

For that purpose, I've made a small PERL daemon with some REGEX or PORT
test which allow me to test a bunch of thing.
2007-03-25 16:45:16 +02:00
Willy Tarreau
4fb20ff1cc [DOC] update architecture guide
Many useful updates to the architecture guide.
2007-03-25 16:01:14 +02:00
Willy Tarreau
7ac51f61f5 [MEDIUM] add the "except" keyword to the "forwardfor" option
Patch from Bryan Germann for 1.2.17.
In some circumstances, it is useful not to add the X-Forwarded-For
header, for instance when the client is another reverse-proxy or
stunnel running on the same machine and which already adds it. This
patch adds the "except" keyword to the "forwardfor" option, allowing
to specify an address or network which will not be added to this
header.
2007-03-25 16:00:04 +02:00
Willy Tarreau
95c20aca35 [MEDIUM] add user/groupname support
Patch from Marcus Rueckert for 1.2.17 :
 "I added the attached patch to haproxy. I don't have a static uid/gid for
  haproxy so i need to specify the username/groupname to run it as non
  root user."
2007-03-25 15:39:23 +02:00
Willy Tarreau
b326fcc46a [CLEANUP] renamed several HTTP structures
Some parts of HTTP processing were incorrectly called "request" while
they are messages or transactions. The following structure members
have changed :

  http_msg.hdr_state => msg_state
  http_msg.sor => som
  http_req.req_state => removed
  http_req => http_txn
2007-03-03 13:54:32 +01:00
Willy Tarreau
244b47beef [DOC] add some doc about internal naming rules 2007-03-03 11:46:27 +01:00
Willy Tarreau
ee68cf29bb [DOC] added a link to an excellent paper about HTTP load time 2007-01-21 19:18:55 +01:00
Willy Tarreau
d1142aa073 [DOC] imported lots of internal documentations
Those documentations provide nothing to users nor contributors
but at least now I know where they are.
2007-01-07 13:03:59 +01:00
Willy Tarreau
1ba6a73594 [DOC] updated the http_parsing doc 2007-01-07 12:43:29 +01:00
Willy Tarreau
6d1a9884f9 [MAJOR] complete support and doc for tcp-splicing
The tcp-splicing code has been merged, and a doc has been written.
A configuration example has been derived from the previous content
switching sample.
2007-01-07 02:03:04 +01:00
Willy Tarreau
85270da1d9 [MINOR] updated versions and docs
The version was not updated in some files. Also, added a few
example configs.
2007-01-02 00:59:39 +01:00
Willy Tarreau
0ea7c431fc [DOC] added a short descriptive of the backend mechanism 2006-12-18 00:24:49 +01:00
Willy Tarreau
58f10d7478 [MAJOR] replaced the client-side HTTP parser with a new one
The new parser uses an FSM to strictly follow RFC2616.
Headers are indexed and parsed only once they're all available.
That way, complex regexes make more sense.

HTTP processing is now performed in several phases by calling
multiple functions, making the code cleaner and easier to read.

Note that req[i]pass does not work anymore because it would
require that we mark a header to be ignored. What is really
needed is to have the ability to add an exception to a matching
(match xx except yy).

Several bugs have been fixed in appsession during the conversion
to the new FSM (method length and recovery on malloc errors).

The code does build and work with the debug examples, but is
not usable yet to connect to anything as it does not forward
the requests yet.
2006-12-04 02:26:12 +01:00
Willy Tarreau
08fa2e37fd [MINOR] tarpit: close the connection if the client closes.
There's no point at maintaining an open tarpitted connection
if the client has left.
2006-09-03 10:47:37 +02:00
Willy Tarreau
2272dc14bb [DOC] add docs and examples of tarpit configuration 2006-09-03 10:19:38 +02:00
Willy Tarreau
8f2b855ab2 [RELEASE] released 1.3.1 after resyncing with 1.2.15
Released 1.3.1 with the following changes from 1.2.15 :
   - now, haproxy warns about missing timeout during startup to try to
     eliminate all those buggy configurations.
   - added "Content-Type: text/html" in responses wherever appropriate, as
     suggested by Cameron Simpson.
   - implemented "option ssl-hello-chk" to use SSLv3 CLIENT HELLO messages to
     test server's health
   - implemented "monitor-uri" so that haproxy can reply to a specific URI with
     an "HTTP/1.0 200 OK" response. This is useful to validate multiple proxies
     at once.
2006-07-09 17:11:39 +02:00
Willy Tarreau
1c47f85292 [MEDIUM] implemented the 'monitor-uri' keyword.
It is used to test haproxy's status with an HTTP request to which
it will reply with HTTP/1.0 200 OK.
2006-07-09 17:01:40 +02:00
Willy Tarreau
f3c692090e [MEDIUM] implement 'option ssl-hello-chk' to use CLIENT HELLO health checks.
This makes it possible to relay SSL connections in pure TCP instances while
ensuring the remote end really receives our data eventhough intermediate
agents (firewalls, proxies, ...) might acknowledge the connection.
2006-07-09 16:42:34 +02:00
Willy Tarreau
baaee00406 [BIGMOVE] exploded the monolithic haproxy.c file into multiple files.
The files are now stored under :
  - include/haproxy for the generic includes
  - include/types.h for the structures needed within prototypes
  - include/proto.h for function prototypes and inline functions
  - src/*.c for the C files

Most include files are now covered by LGPL. A last move still needs
to be done to put inline functions under GPL and not LGPL.

Version has been set to 1.3.0 in the code but some control still
needs to be done before releasing.
2006-06-26 02:48:02 +02:00
Willy TARREAU
3dc0644167 [LICENSE] licensing clarifications 2006-06-15 21:48:13 +02:00
Willy Tarreau
94b4591f20 [DOC] renamed 'haproxy' instead of 'ha-proxy' or 'h a p r o x y'
File indexation systems (including search engines) did not read
'haproxy' when needed, which made it more difficult to find the
doc on the net.
2006-05-31 06:40:15 +02:00
willy tarreau
7e6328df2a [RELEASE] released 1.2.14
Released 1.2.14 with the following changes :

   - new HTML status report with the 'stats' keyword.
   - added the 'abortonclose' option to better resist traffic surges
   - implemented dynamic traffic regulation with the 'minconn' option
   - show request time on denied requests
   - definitely fixed hot reconf on OpenBSD by the use of SO_REUSEPORT
   - now a proxy instance is allowed to run without servers, which is
     useful to dedicate one instance to stats
   - added lots of error counters
   - a missing parenthesis preventd matching of cacheable cookies
   - a missing parenthesis in poll_loop() might have caused missed events.
2006-05-21 23:26:20 +02:00
willy tarreau
8f635a4feb [DOC] french doc update 2006-05-21 23:05:54 +02:00
willy tarreau
d4ba08d7ca [DOC] add some informations about 'stats' and 'option httpclose'. 2006-05-21 21:54:14 +02:00
willy tarreau
052c15dbe6 Merge branch 'abort-close' into merge 2006-05-21 21:43:58 +02:00
willy tarreau
481132e07c [DOC] documented the 'stats' parameter. 2006-05-21 21:43:10 +02:00
willy tarreau
12e0212448 Merge branch 'minconn' into abort-close 2006-05-21 21:11:03 +02:00
willy tarreau
f76e6cad83 [MAJOR] implemented the 'minconn' server parameter for dynamic load regulation
When 'minconn' is set, the number of simultaneous sessions sent to the server
will be limited by a dynamic value depending on the global load on the
instance itself. The principle is to fix the maximal concurrency on the server
proportionnally to the instance's usage relative to its maxconn, with a minimum
fixed to <minconn>. The formula for the number of simultaneous sessions sent
to the server is then max(srv_minconn, srv_maxconn*px_conn/px_maxconn). This
helps unloading the servers when the load is very low.
2006-05-21 21:09:55 +02:00
willy tarreau
e0bdd62128 [DOC] documented the 'abortonclose' option 2006-05-21 20:51:54 +02:00
willy tarreau
532bb554aa [DOC] update documentation to explain the server's maxconn 2006-05-13 18:40:37 +02:00
willy tarreau
078c79a009 [MINOR] make logs more accurate about expiration and close during queue. 2006-05-13 12:23:58 +02:00
willy tarreau
34f4530c3a [doc] updated english and french docs with source and weight options. 2006-04-15 21:37:14 +02:00
Willy TARREAU
767ba71444 * the default 'httpclose' option only sets the 'Connection:' headers
to 'close', but does not actually close any connection. The problem
  is, there are some servers which don't close the connection even if
  the proxy tells them 'Connection: close'. A workaround was added by
  the way of a new option 'forceclose' (which implies 'httpclose'),
  and which makes the proxy close the outgoing channel to the server
  once it has sent all its headers. Just don't use this with the
  'CONNECT' method of course !
2006-03-01 22:40:50 +01:00
Willy TARREAU
3481c46368 * there was a bug in the way the backup servers were handled. They
were erroneously load-balanced while the doc said the opposite.
  Since load-balanced backup servers is one of the features some
  people have been asking for, the problem was fixed to reflect the
  documented behaviour and a new option 'allbackups' was introduced
  to provide the feature to those who need it.
2006-03-01 22:37:57 +01:00
willy tarreau
065f1c0798 * bumped version to 1.2.8 and updated CHANGELOG accordingly 2006-01-29 22:10:07 +01:00
willy tarreau
39df2dc8fc * fixed version references in documentation 2006-01-29 21:56:05 +01:00
willy tarreau
22739efb4a * Documentation about the hot-reconfiguration mechanism. 2006-01-29 21:40:41 +01:00
willy tarreau
b952e1db84 * released 1.2.7rc (1.1.33rc)
* second batch of socklen_t changes.
* clean-ups from Cameron Simpson.
* because tv_remain() does not know about eternity, using no timeout can
  make select() spin around a null time-out. Bug reported by Cameron Simpson.
* client read timeout was not properly set to eternity initialized after an
  accept() if it was not set in the config. It remained undetected so long
  because eternity is 0 and newly allocated pages are zeroed by the system.
* do not call get_original_dst() when not in transparent mode.
* implemented a workaround for a bug in certain epoll() implementations on
  linux-2.4 kernels (epoll-lt <= 0.21).
* implemented TCP keepalive with new options : tcpka, clitcpka, srvtcpka.
2005-12-18 01:31:20 +01:00
willy tarreau
c5f73ed21c * released 1.2.6
* clean-up patch from Alexander Lazic fixes build on Debian 3.1 (socklen_t).
2005-12-18 01:26:38 +01:00
willy tarreau
64a3cc3660 * released 1.2.5 (1.1.31)
* changed the runtime argument to disable epoll() to '-de'
* changed the runtime argument to disable poll() to '-dp'
* added global options 'nopoll' and 'noepoll' to do the same at the
  configuration level.
* added a 'linux24e' target to the Makefile for Linux 2.4 systems patched to
  support epoll().
* changed default FD_SETSIZE to 65536 on Solaris (default=1024)
* conditionned signals redirection to #ifdef DEBUG_MEMORY
2005-12-18 01:13:11 +01:00
willy tarreau
c1f4753d60 * released 1.2.5-pre2
* implemented the HTTP 303 code for error redirection. This forces the
  browser to fetch the given URI with a GET request. The new keyword for
  this is 'errorloc303', and a new 'errorloc302' keyword has been created
  to make them easily distinguishable.
* added more controls in the parser for valid use of '\x' sequence.
* few fixes from Alex & Klaus
* fixed a few errors in the documentation
* do not pre-initialize unused file-descriptors before select() anymore.
2005-12-18 01:08:26 +01:00
willy tarreau
598da41537 * released 1.2.5-pre1
* build fixes for appsession
* documentation for appsession
2005-12-18 01:07:29 +01:00
willy tarreau
0174f319a2 * released 1.2.3 (1.1.30)
* add an architecture guide to the documentation
* released without any changes
* increased default BUFSIZE to 16 kB to accept max headers of 8 kB which is
  compatible with Apache. This limit can be configured in the makefile now.
  Thanks to Eric Fehr for the checks.
* added a per-server "source" option which now makes it possible to bind to
  a different source for each (potentially identical) server.
* changed cookie-based server selection slightly to allow several servers to
  share a same cookie, thus making it possible to associate backup servers to
  live servers and ease soft-stop for maintenance periods. (Alexander Lazic)
* added the cookie 'prefix' mode which makes it possible to use persistence
  with thin clients which support only one cookie. The server name is prefixed
  before the application cookie, and restore back.
* fixed the order of servers within an instance to match documentation. Now
  the servers are *really* used in the order of their declaration. This is
  particularly important when multiple backup servers are in use.
2005-12-18 01:02:42 +01:00
willy tarreau
4302f49525 * released 1.2.2 (1.1.29)
* fixed a bug where a TCP connection would be logged twice if the 'logasap'
  option was enabled without the 'tcplog' option.
* encode_string() would use hdr_encode_map instead of the map argument.
* the logged request is now encoded with '#XX' for unprintable characters
* new keywords 'capture request header' and 'capture response header' enable
  logging of arbitrary HTTP headers in requests and responses
* removed "-DSOLARIS" after replacing the last inet_aton() with inet_pton()
2005-12-18 01:00:37 +01:00
willy tarreau
982249e9e7 * released 1.2.1 (1.1.28)
* added the '-V' command line option to verbosely report errors even though
  the -q or 'quiet' options are specified. This is useful with '-c'.
* added a Red Hat init script and a .spec from Simon Matter <simon.matter@invoca.ch>
* added 'rspdeny' and 'rspideny' to block certain responses to avoid sensible
  information leak from servers.
* more examples added into the configuration
2005-12-18 00:57:06 +01:00
willy tarreau
fe2c5c147b * released 1.1.27
* the configurable HTTP health check introduced in 1.1.23 revealed a shameful
  bug : the code still assumed that HTTP requests were the same size as the
  original ones (22 bytes), and failed if they were not.
* added support for pidfiles.
2005-12-17 14:14:34 +01:00
willy tarreau
c1cae63922 * released 1.1.25
* added the 'tcplog' option, which provides enhanced, HTTP-like logs for
  generic TCP proxies, or lighter logs for HTTP proxies.
* fixed a time-out condition wrongly reported as client time-out in data
  phase if the client timeout was lower than the connect timeout times the
  number of retries.
* doc: added some precisions about the log timers
2005-12-17 14:12:23 +01:00
willy tarreau
197e8ec2c3 * released 1.1.24
* if a client sent a full request then shut its write connection down, then
  the request was aborted. This case was detected only when using haproxy
  both as health-check client and as a server.
* if 'option httpchk' is used in a 'health' mode server, then responses will
  change from 'OK' to 'HTTP/1.0 200 OK'.
* fixed a Linux-only bug in case of HTTP server health-checks, where a single
  server response followed by a close could be ignored, and the server seen
  as failed.
* renamed 'haproxy.txt' to 'haproxy-fr.txt'
* large documentation and examples cleanups
2005-12-17 14:10:59 +01:00
willy tarreau
eedaa9f220 * released 1.1.23
* fixed a stupid bug introduced in 1.1.22 which caused second and subsequent
  'default' sections to keep previous parameters, and not initialize logs
  correctly.
* fixed a second stupid bug introduced in 1.1.22 which caused configurations
  relying on 'dispatch' mode to segfault at the first connection.
* 'option httpchk' now supports method, HTTP version and a few headers.
* now, 'option httpchk', 'cookie' and 'capture' can be specified in
  'defaults' section
* a fresh new english documentation
* large Makefile cleanup for increased portability
* new build script 'build.cfg' for Formilux-0.1.8
* new startup script 'init.haproxy.flx0' for Formilux-0.1.8
2005-12-17 14:08:03 +01:00
willy tarreau
a41a8b4ee6 * released 1.1.22
* 'listen' now supports optionnal address:port-range lists
* 'bind' introduced to add new listen addresses
* fixed a bug which caused a session to be kept established on a server till
  it timed out if the client closed during the DATA phase.
* the port part of each server address can now be empty to make the proxy
  connect to the server on the same port it was connected to, be an absolute
  unsigned number to reflect a single port (as in older versions), or an
  explicitly signed number (+N/-N) to indicate that this offset must be
  applied to the port the proxy was connected to, when connecting to the
  server.
* the 'port' server option allows the user to specify a different
  health-check port than the service one. It is mandatory when only relative
  ports have been specified and check is required. By default, the checks are
  sent to the service port.
* new 'defaults' section which is rather similar to 'listen' except that all
  values are only used as default values for future 'listen' sections, until
  a new 'defaults' resets them. At the moment, server options, regexes,
  cookie names and captures cannot be set in the 'defaults' section.
* Makefile now optimizes for Ultrasparc by default on Solaris/Sparc
* large documentation updates and fixes
* new 'tests' directory with some debug files
2005-12-17 14:02:24 +01:00
willy tarreau
2f6ba6579f * released 1.1.21
* changed the debug output format so that it now includes the session unique
  ID followed by the instance name at the beginning of each line.
* in debug mode, accept now shows the client's IP and port.
* added one 3 small debugging scripts to search and pretty print debug output
* changed the default health check request to "OPTIONS /" instead of
  "OPTIONS *" since not all servers implement the later one.
* "option httpchk" now accepts an optional parameter allowing the user to
  specify and URI other than '/' during health-checks.
* made Makefile more robust to pcre-config errors
* added 3 new pretty-print scripts : debug2ansi, debug2html and debugfind
* upgraded Formilux package to haproxy-1.1.21-flx.1.pkg
* removed the now obsolete haproxy2html.sh
2005-12-17 13:57:42 +01:00
willy tarreau
036e1cef51 * released 1.1.18
* Haproxy can be compiled with PCRE regex instead of libc regex, by setting
  REGEX=pcre on the make command line.
* HTTP health-checks now use "OPTIONS *" instead of "OPTIONS /".
* when explicit source address binding is required, it is now also used for
  health-checks.
* added 'reqpass' and 'reqipass' to allow certain headers but not the request
  itself.
* factored several strings to reduce binary size by about 2 kB.
* replaced setreuid() and setregid() with more standard setuid() and setgid().
* added 4 status flags to the log line indicating who ended the connection
  first, the sessions state, the validity of the cookie, and action taken on
  the set-cookie header.
* rearranged the changelog and removed it from haproxy.c
* large documentation updates
2005-12-17 13:46:33 +01:00
willy tarreau
8337c6b7bd * released 1.1.17
* add the notion of "backup" servers, which are used only when all other
  servers are down.
* make Set-Cookie return "" instead of "(null)" when the server has no
  cookie assigned (useful for backup servers).
* "log" now supports an optionnal level name (info, notice, err ...) above
  which nothing is sent.
* replaced some strncmp() with memcmp() for better efficiency.
* added "capture cookie" option which logs client and/or server cookies
* cleaned up/down messages and dump servers states upon SIGHUP
* added a redirection feature for errors : "errorloc <errnum> <url>"
* now we won't insist on connecting to a dead server, even with a cookie,
  unless option "persist" is specified.
* added HTTP/408 response for client request time-out and HTTP/50[234] for
  server reply time-out or errors.
* updates to the examples files
* added a 'do_status' command to the Formilux init script
2005-12-17 13:41:01 +01:00
willy tarreau
bc4e1fb68a * released 1.1.16
* implement HTTP health checks when option "httpchk" is specified.
* put the changelog into a new CHANGELOG file
* updated the Formilux init script
2005-12-17 13:32:07 +01:00
willy tarreau
cd87894af0 * released 1.1.14
* added "postonly" cookie mode
2005-12-17 13:27:43 +01:00
willy tarreau
240afa6d23 * released 1.1.11
* fixed multi-cookie handling in client request to allow clean deletion
  in insert+indirect mode. Now, only the server cookie is deleted and not
  all the header. Should now be compliant to RFC2109.
* added a "nocache" option to "cookie" to specify that we explicitly want
  to add a "cache-control" header when we add a cookie.
  It is also possible to add an "Expires: <old-date>" to keep compatibility
  with old/broken caches.
* some doc and examples cleanups
2005-12-17 13:14:35 +01:00
willy tarreau
96d4037194 * released 1.1.10
* if a cookie is used in insert+indirect mode, it's desirable that the
  the servers don't see it. It was not possible to remove it correctly
  with regexps, so now it's removed automatically.
2005-12-17 13:11:56 +01:00
willy tarreau
c29948c439 * released 1.1.9 : SECURITY FIX
* don't use snprintf()'s return value as an end of message since it may
  be larger. This caused bus errors and segfaults in internal libc's
  getenv() during localtime() in send_log().
* removed dead insecure send_syslog() function and all references to it.
* fixed warnings on Solaris due to buggy implementation of isXXXX().
2005-12-17 13:10:27 +01:00
willy tarreau
a159808bf2 * released 1.1.8
* option "dontlognull"
* fixed "double space" bug in config parser
* fixed an uninitialized server field in case of dispatch
  with no existing server which could cause a segfault during
  logging.
* the pid logged was always the father's, which was wrong for daemons.
* fixed wrong level "LOG_INFO" for message "proxy started".
* http logging is now complete :
  - ip:port, date, proxy, server
  - req_time, conn_time, hdr_time, tot_time
  - status, size, request
* source address binding
2005-12-17 13:08:06 +01:00
willy tarreau
535ae7aee2 * released 1.1.5
* connection logging displayed incorrect source address.
* added proxy start/stop and server up/down log events.
* replaced log message short buffers with larger trash.
* enlarged buffer to 8 kB and replace buffer to 4 kB.
* added a config.rc example for Formilux
* added a build script for Formilux
2005-12-17 12:58:00 +01:00
willy tarreau
e47c8d7279 * released 1.1.4
* made rise/fall/interval time configurable
2005-12-17 12:55:52 +01:00
willy tarreau
b719f009c6 * released 1.1.3
* added a script to tune the network stack
* fixed a bug : cr_expire and cw_expire were inverted in CL_STSHUT[WR]
  which could lead to loops.
2005-12-17 12:55:07 +01:00
willy tarreau
efae1847c3 * released 1.1.1
* fixed a bug in total failure handling
* fixed a bug in timestamp comparison within same second (tv_cmp_ms)
2005-12-17 12:51:03 +01:00
willy tarreau
5cbea6fd41 * released 1.1.0
* added OpenBSD, Linux-2.2 and Linux-2.4 targets to the Makefile
* added a Formilux init script
* fixed a few timeout bugs
* rearranged the task scheduler subsystem to improve performance,
  add new tasks, and make it easier to later port to librt ;
* allow multiple accept() for one select() wake up ;
* implemented internal load balancing with basic health-check ;
* cookie insertion and header add/replace/delete, with better strings
  support.
* reworked buffer handling to fix a few rewrite bugs, and
  improve overall performance.
* implement the "purge" option to delete server cookies in direct mode.
* fixed some error cases where the maxfd was not decreased.
* now supports transparent proxying, at least on linux 2.4.
* soft stop works again (fixed select timeout computation).
* it seems that TCP proxies sometimes cannot timeout.
* added a "quiet" mode.
* enforce file descriptor limitation on socket() and accept().
2005-12-17 12:48:26 +01:00
willy tarreau
0f7af91265 * initial commit of version 1.0.0 2005-12-17 12:21:26 +01:00