willy tarreau [Sun, 14 May 2006 21:06:28 +0000 (23:06 +0200)]
[MEDIUM] added the new 'stats' keyword with user authentication subsystem.
Right now it only validates the user/passwd according to a specified list,
and lets the user pass through the proxy if the authentication is OK, and
it refuses any invalid access with a 401 Unauthorized response.
Willy TARREAU [Sun, 14 May 2006 08:00:09 +0000 (10:00 +0200)]
[RELEASE] released version 1.2.13.1
- an uninitialized field in the struct session could cause a crash when
the session was freed. This has been encountered on Solaris only.
- Solaris and OpenBSD no not support shutdown() on listening socket. Let's
be nice to them by performing a soft stop if pause fails.
Willy TARREAU [Sun, 14 May 2006 07:55:23 +0000 (09:55 +0200)]
[MEDIUM] perform a soft stop when pause fails to be nice with non-Linux systems.
At least OpenBSD and Solaris do not support shutdown() on listening socket.
So instead of blocking the hot reconfiguration, at least we can perform a
soft stop if the shutdown fails, so that the new daemon can bind to the
ports without trouble.
willy tarreau [Sat, 13 May 2006 16:51:38 +0000 (18:51 +0200)]
[RELEASE] released version 1.2.13
Summary of changes :
- 'maxconn' server parameter to do per-server session limitation
- queueing to support non-blocking session limitation
- fixed removal of cookies for cookie-less servers such as backup servers
- two separate wait queues for expirable and non-expirable tasks provide
better performance with lots of sessions.
- some code cleanups and performance improvements
- made state dumps a bit more verbose
- fixed missing checks for NULL srv in dispatch mode
- load balancing on backup servers was not possible in source hash mode.
- two session flags shared the same bit, but fortunately they were not
compatible.
willy tarreau [Thu, 11 May 2006 23:29:08 +0000 (01:29 +0200)]
[CRITICAL] fix a crashing trouble with the maxconn limits.
If a task was queued on a server and if this task was alone and aborted
before any other task did anything, there were situations by which it
might have queued itself in the run queue, then exited, and the upcoming
tv_queue() associated to the run loop would have resurrected it siently,
causing crashes in task_queue.
The new principle consists in assigning a task to every server that
needs a connection limit. This task will be woken up every time we
suspect we might leave some place to queue a task. The server's task
itself will only have to run across its queue and run the available
number of tasks.
willy tarreau [Tue, 9 May 2006 21:32:26 +0000 (23:32 +0200)]
[MINOR] set the expiration date when removing a cookie
It was specified in the documentation that a cookie would be deleted if the
client was switched to a cookie-less server such as a backup server, in
order to avoid stickyness on errors. To achieve this, an empty cookie was
returned. It seems this no longer works (at least with Firefox 1.5 and
Mozilla 1.8a5), because the browser returns the empty cookie. The cookie
specification says that in order to remove a cookie, it must be accompanied
by an expiration date in the past, so this is what we do. Tested on Mozilla
1.8a5, works.
willy tarreau [Mon, 8 May 2006 09:52:55 +0000 (11:52 +0200)]
[MINOR] swapped the queued and active sessions in the logs
It was not natural to read sess/pend/lsess/psess in the logs, so before
the feature became official, I've swapped them to read :
pend/sess/lsess/psess
Where <pend> is the overall number of pending connections on this instance,
including all the servers queues, <sess> is the number of sessions remaining
active on the server when the log was emitted (after the end of the session,
or after parsing the request), <lsess> and <psess> are the number of active
sessions on the listener and on the process respectively.
willy tarreau [Thu, 4 May 2006 17:23:38 +0000 (19:23 +0200)]
[MINOR] uninlining 6 very common functions saved 15% code size and improved perf
by about 1-2% :
tv_delayfrom, tv_cmp_ms, tv_cmp2, tv_cmp2_ms, tv_remain2, fd_delete
willy tarreau [Tue, 2 May 2006 20:54:52 +0000 (22:54 +0200)]
[MEDIUM] logs now show the time spent in the queue and the number of sessions
already waiting at accept() time. This number of session is global per instance
so it does not reflect one particular server.
willy tarreau [Tue, 2 May 2006 12:51:00 +0000 (14:51 +0200)]
[MEDIUM] slightly optimize the scheduler for non-expirable tasks.
The non-expirable tasks are now sent to a dedicated wait-queue so that
they do not pollute the other ones anymore. This is a temporary dirty
hack which will go away with the new O(log(n)) scheduler.
willy tarreau [Mon, 1 May 2006 22:19:57 +0000 (00:19 +0200)]
[MAJOR] first limited implementation of connection queueing.
There is no timeout yet, and the server UP/DOWN events are not used
to export/import list of connections yet. It seems that the process
can sometimes eat lots of user CPU (~50%) if a maxconn is set on an
overloaded server.
[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.