haproxy/include/proto
Willy Tarreau 7c669d7e0f [BUG] fix the dequeuing logic to ensure that all requests get served
The dequeuing logic was completely wrong. First, a task was assigned
to all servers to process the queue, but this task was never scheduled
and was only woken up on session free. Second, there was no reservation
of server entries when a task was assigned a server. This means that
as long as the task was not connected to the server, its presence was
not accounted for. This was causing trouble when detecting whether or
not a server had reached maxconn. Third, during a redispatch, a session
could lose its place at the server's and get blocked because another
session at the same moment would have stolen the entry. Fourth, the
redispatch option did not work when maxqueue was reached for a server,
and it was not possible to do so without indefinitely hanging a session.

The root cause of all those problems was the lack of pre-reservation of
connections at the server's, and the lack of tracking of servers during
a redispatch. Everything relied on combinations of flags which could
appear similarly in quite distinct situations.

This patch is a major rework but there was no other solution, as the
internal logic was deeply flawed. The resulting code is cleaner, more
understandable, uses less magics and is overall more robust.

As an added bonus, "option redispatch" now works when maxqueue has
been reached on a server.
2008-06-20 15:08:06 +02:00
..
acl.h [MEDIUM] Fix memory freeing at exit 2008-05-30 07:07:19 +02:00
backend.h [MEDIUM] add support for URI hash depth and length limits 2008-04-28 00:43:55 +02:00
buffers.h [BUG] do not re-arm read timeout after writing data 2007-06-03 16:03:49 +02:00
checks.h [MEDIUM] Spread health checks even more 2007-10-15 09:33:10 +02:00
client.h [MEDIUM] store the original destination address in the session 2007-05-08 23:24:20 +02:00
cttproxy.h [MEDIUM] check for cttproxy support when required 2007-03-24 17:24:39 +01:00
dumpstats.h [MEDIUM] fix stats socket limitation to 16 kB 2008-03-17 22:08:01 +01:00
fd.h [MEDIUM] Fix memory freeing at exit 2008-05-30 07:07:19 +02:00
hdr_idx.h [MAJOR] huge rework of the HTTP request FSM 2007-01-21 19:16:41 +01:00
httperr.h [MEDIUM] errorloc now checked first from backend then from frontend 2006-12-24 17:47:20 +01:00
log.h [MAJOR] ported requri to use mempools v2 2007-05-13 21:36:56 +02:00
proto_http.h [MAJOR] implement parameter hashing for POST requests 2008-04-15 15:30:41 +02:00
proto_tcp.h [MEDIUM] fix server health checks source address selection 2008-01-13 18:40:14 +01:00
proto_uxst.h [MINOR] add a generic delete_listener() primitive 2007-11-04 22:42:49 +01:00
protocols.h [MINOR] add a generic unbind_all_listeners() primitive 2007-11-04 22:42:49 +01:00
proxy.h [MEDIUM] Implement "track [<backend>/]<server>" 2008-02-27 10:39:53 +01:00
queue.h [BUG] fix the dequeuing logic to ensure that all requests get served 2008-06-20 15:08:06 +02:00
senddata.h [MEDIUM] moved stats and buffer generic functions to new files 2007-10-18 14:12:21 +02:00
server.h [MEDIUM]: rework checks handling 2008-01-22 11:29:06 +01:00
session.h [BUG] fix the dequeuing logic to ensure that all requests get served 2008-06-20 15:08:06 +02:00
stream_sock.h [MEDIUM] got rid of event_{cli,srv}_write() in favor of stream_sock_write() 2006-07-29 19:01:31 +02:00
task.h [OPTIM] GCC4's builtin_expect() is suboptimal 2008-02-14 23:14:33 +01:00
template.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00