Commit Graph

122 Commits

Author SHA1 Message Date
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
willy tarreau
25424f8558 Make health-checks be more regular, and faster to retry after a timeout. 2006-03-19 19:37:48 +01:00
willy tarreau
c2becdc403 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.
2006-03-19 19:36:48 +01:00
willy tarreau
05be12bb20 Make fd management more robust and easier to debug. Also some micro-optimisations. 2006-03-19 19:35:00 +01:00
willy tarreau
779dc897e7 assert.h is needed when DEBUG is defined. 2006-03-19 19:32:29 +01:00
willy tarreau
50be0170d1 Updated version to 1.2.9 2006-03-15 19:41:19 +01:00
Willy TARREAU
2bfdd8e26a * haproxy could not be stopped after being paused. 2006-03-12 18:03:05 +01:00
Willy TARREAU
dd676173f0 * automatically deduce ulimit-n from maxsock 2006-03-12 18:01:33 +01:00
Willy TARREAU
203b0b624f * account for the sockets needed for listeners and checks
during computation of maximum number of sockets.
2006-03-12 18:00:28 +01:00