Commit Graph

21830 Commits

Author SHA1 Message Date
willy tarreau
47ee7ad0a4 [MINOR] also set request time on denied requests 2006-05-18 01:25:36 +02:00
willy tarreau
950609c39c [MINOR] set request time even for stats requests 2006-05-18 01:23:51 +02:00
willy tarreau
d0a05bd220 [BUILD] updated Makefile.bsd for the new files 2006-05-18 01:22:27 +02:00
willy tarreau
cb4065148c [MEDIUM] completed HTML status output, fixed some rendering bugs.
Removed one missed debugging write(), fixed buffer management.
Now the HTML table output uses a color code with a caption. Some
more statistics have been collected such as maximum values reached
and failed health checks. Null limits now show "-" instead of "0".
2006-05-18 00:52:35 +02:00
willy tarreau
e033126130 [MEDIUM] first working code for an HTML status report. 2006-05-15 03:02:46 +02:00
willy tarreau
51e912947e [DOC] missing comment caused misinterpretation 2006-05-14 23:29:47 +02:00
willy tarreau
3504a01cb4 [DEBUG] state names were shifted due to missing PEND state. 2006-05-14 23:20:07 +02:00
willy tarreau
9e1388671a [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.
2006-05-14 23:06:28 +02:00
Willy TARREAU
4404b7ebcc [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.
2006-05-14 10:00:09 +02:00
Willy TARREAU
007aa4606e [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.
2006-05-14 09:55:23 +02:00
Willy TARREAU
1a71cc14c9 [CRITICAL] fixed an uninitialized 'pend_pos' field in struct session.
This might cause random crashes when memory is not initialized first.
Encountered on Solaris 8 only for now, OpenBSD and Linux seem unaffected.
2006-05-14 09:10:03 +02:00
willy tarreau
c3a2e0713f [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.
2006-05-13 18:51:38 +02:00
willy tarreau
532bb554aa [DOC] update documentation to explain the server's maxconn 2006-05-13 18:40:37 +02:00
willy tarreau
5f15c5517a [MINOR] the queue time was missing from TCP logs. 2006-05-13 18:37:04 +02:00
willy tarreau
424e04a32b [MINOR] do not report queue time if not queued ! 2006-05-13 16:10:47 +02:00
willy tarreau
814cbc6a72 [DOC] added (and updated) the ROADMAP file 2006-05-13 13:00:29 +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
5e69b1610f [MINOR] separately display the server and proxy queue sizes in the logs 2006-05-12 19:49:37 +02:00
willy tarreau
9fea194154 [CLEANUP] remove the unused SV_STCPEND state 2006-05-12 19:46:40 +02:00
willy tarreau
59a6cc2d73 [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.
2006-05-12 11:05:57 +02:00
willy tarreau
000375f0bb [CLEANUP] added some comments at some complex places 2006-05-12 11:05:54 +02:00
willy tarreau
422bb2e79f [MEDIUM] in the request, always consider empty cookies as invalid.
This solves a problem of unwanted stickyness to backup servers when some
clients incidentely memorize an empty cookie.
2006-05-10 04:27:21 +02:00
willy tarreau
4f7a101265 [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.
2006-05-09 23:32:26 +02:00
willy tarreau
f2b8d30d93 [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.
2006-05-08 11:52:55 +02:00
willy tarreau
dab722b6b7 [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
2006-05-04 19:23:38 +02:00
willy tarreau
bc2eda6fda [MEDIUM] when a server goes up, it now steals part of the proxy's queue. 2006-05-04 15:16:23 +02:00
willy tarreau
2812edcde8 [MEDIUM] redispatch queued sessions if possible when a server goes down. 2006-05-04 12:09:37 +02:00
willy tarreau
45526ed05b [MEDIUM] apply the contimeout to the queue by default.
An improvement will be to have a separate timeout for the queue.
2006-05-03 20:11:50 +02:00
willy tarreau
8cef8a9e78 [doc] updated the TODO 2006-05-02 23:45:50 +02:00
willy tarreau
4632c21c11 [MINOR] updated the sig_dump_state() output to show the conn queue state. 2006-05-02 23:32:51 +02:00
willy tarreau
f32f52404b [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.
2006-05-02 22:54:52 +02:00
willy tarreau
5e698ef509 [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.
2006-05-02 14:51:00 +02:00
willy tarreau
dfece23f7d [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.
2006-05-02 00:19:57 +02:00
willy tarreau
fd5c879b4d [MINOR] print the proxy name on first line during dumps to avoid confusion. 2006-05-01 15:28:01 +02:00
willy tarreau
926a3575e6 [MAJOR] fixed missing checks for NULL srv pointers (possible in dispatch mode) 2006-05-01 15:26:35 +02:00
willy tarreau
cd655351b8 [MEDIUM] it was not possible to balance between backup servers in source hash mode. 2006-04-29 12:11:46 +02:00
willy tarreau
a5e8c663a9 [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.
2006-04-29 10:43:46 +02:00
willy tarreau
0889c962b5 [CLEANUP] cleaned some comments. 2006-04-24 14:36:48 +02:00
willy tarreau
7feab59518 [MINOR] always process the run queue from the head.
This ensures that any task wan wake any other task up and that it will be
processed too.
2006-04-22 15:13:16 +02:00
willy tarreau
898db9d595 [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. 2006-04-15 22:59:58 +02:00
willy tarreau
18a957c325 [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 2006-04-15 22:59:34 +02:00
willy tarreau
80862a3b9e [MINOR] imported mini-clist.h (circular lists) from librt. It might be wise to merge this with list.h and use sort of common structures. 2006-04-15 22:59:13 +02:00
willy tarreau
14b4d43db3 [MEDIUM] added the total number of sessions per server and per proxy and we now report it in the dumps. 2006-04-15 22:47:12 +02:00
willy tarreau
cfbb218b42 [MINOR] added some comments to the places where we can send a pending connection to a server in case of throttling. 2006-04-15 22:46:38 +02:00
willy tarreau
a647c7051e [MINOR] maintain the number of sessions per server and add this info to the logs 2006-04-15 22:45:52 +02:00
willy tarreau
a4197319b4 Merge branch 'haproxy-1.2.12' 2006-04-15 22:18:48 +02:00
willy tarreau
c0d4bbdc8d [VERSION] updated everything to reflect version 1.2.12. 2006-04-15 21:47:50 +02:00
willy tarreau
9974d73d98 [BUILD] added haproxy-small.spec for smaller and embedded systems.
Not sure if it's the best way to proceed though...
2006-04-15 21:47:17 +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
b3a64a797e Revert "maintain the number of sessions per server and add this info to the logs"
This reverts c136461676 commit.
2006-04-15 21:10:36 +02:00