[MINOR] stupid bug which caused two different session flags to use the same bit.
Fortunately, this had no side effect because they were not used in same areas.
[MEDIUM] now the round-robin load balancer uses two passes to avoid saturated servers. The first avoids servers which have filled with maxconn connections, and a second pass can enforce the selection of one of them if the first pass found no candidate.
[MEDIUM] added the necessary infrastructure to support per-server session limits : - the "maxconn" config option - the new SV_STCPEND state (connection pending) - a per-server pending connections queue
* added the 'weight' parameter to the servers, limited to 1..256.
It is factored between all the servers so that the servers map
will be smaller and easier to construct.
* added the 'weight' parameter to the servers, limited to 1..256.
It is factored between all the servers so that the servers map
will be smaller and easier to construct.
willy tarreau [Sat, 25 Mar 2006 17:53:50 +0000 (18:53 +0100)]
* added the -sf/-st command-line arguments which are used to specify
a list of pids to send a FINISH or TERMINATE signal upon startup.
They will also be asked to release their port if a bind fails.
willy tarreau [Sat, 25 Mar 2006 17:17:56 +0000 (18:17 +0100)]
* reworked the startup mechanism to allow the sending of a signal to a list
of old pids if a socket cannot be bound, with a retry for a limited amount
of time (1 second by default).
willy tarreau [Sun, 19 Mar 2006 18:36:48 +0000 (19:36 +0100)]
Limit the number of consecutive accept() in multi-process mode.
This produces a more evenly distributed load across the processes and slightly
improves performance by reducing bottlenecks.
Willy TARREAU [Wed, 1 Mar 2006 21:44:17 +0000 (22:44 +0100)]
* health checks sent to servers configured with identical intervals
were sent in perfect synchronisation because the initial time was
the same for all. This could induce high load peaks when fragile
servers were hosting tens of instances for the same application.
Now the load is spread evenly across the smallest interval amongst
a listener.
Willy TARREAU [Wed, 1 Mar 2006 21:40:50 +0000 (22:40 +0100)]
* 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 !
Willy TARREAU [Wed, 1 Mar 2006 21:37:57 +0000 (22:37 +0100)]
* 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.
Willy TARREAU [Wed, 1 Mar 2006 21:33:49 +0000 (22:33 +0100)]
* a never ending connect() could lead to a fast select() loop if
its timeout times the number of retransmits exceeded the server
read or write timeout, because the later was used to compute
select()'s timeout while the connection timeout was not reached.
Willy TARREAU [Wed, 1 Mar 2006 21:30:20 +0000 (22:30 +0100)]
* fixed some tv_cmp_ms() computations. Strictly speaking, there was
a very short window of 1 microsecond every millisecond during which
two events were not considered as 1 ms apart from each other.
Willy TARREAU [Wed, 1 Mar 2006 21:27:48 +0000 (22:27 +0100)]
* now we initialize the libc's localtime structures very early so
that even under OOM conditions, we can still send dated error
messages without segfaulting.
Willy TARREAU [Sun, 8 Jan 2006 00:24:12 +0000 (01:24 +0100)]
* fixed a nasty bug in epoll_loop() and poll_loop() by which an EPOLL_HUP event
could trigger both a read and a write calls, thus sometimes inducing headers
being directly sent from srv to cli without modification, and leading further
modification to crash the process by memory corruption, because
rep.data+rep.l<rep.h so the memmove() length argument is negative. Only
observed with epoll() and never poll(), though this one should have been
affected too. Now, only call functions which have been allowed to.
willy tarreau [Sun, 18 Dec 2005 00:39:19 +0000 (01:39 +0100)]
* TCP health-checks don't detect a connection refused with poll/epoll
because event_srv_chk_r() is called before _w() and flushes the socket
error. The result is that the server remains UP. The problem only
affects pure TCP health-checks when select() is disabled. You may
encounter this on SSL or SMTP proxies.
willy tarreau [Sun, 18 Dec 2005 00:37:12 +0000 (01:37 +0100)]
* The 'retries' option was not used because the connect() could not return
an error if the connection was refused before the the timeout. So the
client was sent to the server anyway and then got its connection broken
because of the write error. This is not a real problem with persistence,
but it definitely is for new clients. This stupid bug must have been
present for years !
willy tarreau [Sun, 18 Dec 2005 00:32:04 +0000 (01:32 +0100)]
* delayed the quiet mode during startup so that most of the startup alerts can
be displayed even in quiet mode.
* display an alert when a listener has no address, invalid or no port, or when
there are no enabled listeners upon startup.
willy tarreau [Sun, 18 Dec 2005 00:31:43 +0000 (01:31 +0100)]
* building with -DUSE_PCRE should include PCRE headers and not regex.h. At
least on Solaris, this caused the libc's regex primitives to be used instead
of PCRE, which caused trouble on group references. This is now fixed.
willy tarreau [Sun, 18 Dec 2005 00:31:20 +0000 (01:31 +0100)]
* 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.
willy tarreau [Sun, 18 Dec 2005 00:20:14 +0000 (01:20 +0100)]
* released 1.2.6-pre4
* the time-out fix introduced in 1.1.25 caused a corner case where it was
possible for a client to keep a connection maintained regardless of the
timeout if the server closed the connection during the HEADER phase,
while the client ignored the close request while doing nothing in the
other direction. This has been fixed now by ensuring that read timeouts
are re-armed when switching to any SHUTW state.
* enhanced error reporting in the logs. Now the proxy will precisely detect
various error conditions related to the system and/or process limits, and
generate LOG_EMERG logs indicating that a resource has been exhausted.
* logs will contain two new characters for the error cause : 'R' indicates
a resource exhausted, and 'I' indicates an internal error, though this
one should never happen.
* server connection timeouts can now be reported in the logs (sC), as well
as connections refused because of maxconn limitations (PC).
* new global configuration keyword "ulimit-n" may be used to raise the FD
limit to usable values.
* a warning is now displayed on startup if the FD limit is lower than the
configured maximum number of sockets.
* new configuration keyword "monitor-net" makes it possible to be monitored
by external devices which connect to the proxy without being logged nor
forwarded to any server. Particularly useful on generic TCPv4 relays.
willy tarreau [Sun, 18 Dec 2005 00:13:48 +0000 (01:13 +0100)]
* released 1.2.5.1
* dirty hack to fix a bug introduced with epoll : if we close an FD and
immediately reassign it to another session through a connect(), the
Prev{Read,Write}Events are not updated, which causes trouble detecting
changes, thus leading to many timeouts at high loads.