1
0
mirror of http://git.haproxy.org/git/haproxy.git/ synced 2025-05-14 13:51:54 +00:00
Commit Graph

130 Commits

Author SHA1 Message Date
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
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
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
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
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
c0d4bbdc8d [VERSION] updated everything to reflect version 1.2.12. 2006-04-15 21:47:50 +02:00
willy tarreau
2c51373bfa [MINOR] optionnal '-s' command line argument could clobber '-st' and '-sf' 2006-04-15 19:25:16 +02:00
willy tarreau
cc1e2bda20 * implemented the weighted load balancing based on a server map.
Weighted roundrobin and weighted source hash are now supported.
2006-04-15 19:02:24 +02:00
willy tarreau
e3f023f677 * 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.
2006-04-15 19:01:09 +02:00
willy tarreau
43b1512834 * ignore leading empty lines in HTTP requests (RFC2616) 2006-04-15 18:50:09 +02:00
willy tarreau
e0dd269db8 * Released version 1.2.11.1 2006-03-30 16:27:34 +02:00
willy tarreau
06a1205f57 * it might have been possible that a flapping server would not have been
detected UP is responding just before being declared down.
2006-03-30 15:03:36 +02:00
willy tarreau
d2058dc491 * updated CHANGELOG and haproxy.c to display version 1.2.11 2006-03-25 20:35:41 +01:00
willy tarreau
bf8ff3d4cc * added the '-db' command-line option to disable backgrounding. 2006-03-25 20:33:48 +01:00
willy tarreau
53e99701c6 * 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.
2006-03-25 20:33:42 +01:00
willy tarreau
41310e7d9d * 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).
2006-03-25 20:33:33 +01:00
willy tarreau
746e26b180 * added the ability to enforce limits on memory usage. 2006-03-25 20:33:22 +01:00
willy tarreau
1a3442daee * added the 'source' load-balancing algorithm which uses the source IP(v4|v6) 2006-03-25 20:33:17 +01:00
willy tarreau
4c8c2b5f08 * re-architectured the server round-robin mechanism to ease integration of
other algorithms. It now relies on the number of active and backup servers.
2006-03-25 20:33:10 +01:00
willy tarreau
62084d4f2d * added a counter for the number of active and backup servers, and report
these numbers upon SIGHUP or state change.
2006-03-25 20:33:07 +01:00
willy tarreau
bfad574854 Released 1.2.10.1 2006-03-23 14:19:11 +01:00
willy tarreau
72e583d030 While fixing the backup server round-robin "feature", a new bug was introduced
which could miss some backup servers.
2006-03-23 11:27:02 +01:00
willy tarreau
1fb3493492 * The displayed proxy name was wrong when dumping upon SIGHUP. 2006-03-23 11:22:10 +01:00
willy tarreau
d8b1fa5269 Released version 1.2.10 2006-03-19 21:01:07 +01:00
willy tarreau
fd6dfe7c76 Fixed some messages to ease parsing of alerts. 2006-03-19 19:38:19 +01:00