haproxy/include/types
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, part 2 2008-06-07 11:06:14 +02:00
backend.h [MAJOR] implement parameter hashing for POST requests 2008-04-15 15:30:41 +02:00
buffers.h [MEDIUM] detect streaming buffers and tag them as such 2008-05-25 10:41:12 +02:00
capture.h [MAJOR] last bunch of capture changes for mempool v2 2007-05-13 22:46:04 +02:00
client.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00
fd.h [BUG] fix truncated responses with sepoll 2008-01-18 17:20:13 +01:00
global.h [OPTIM] introduce global parameter "tune.maxaccept" 2008-01-06 11:22:57 +01:00
hdr_idx.h [BUG] files were missing for hdr_idx in previous commit 2006-12-04 02:20:02 +01:00
httperr.h [MAJOR] udpated the stats page to clearly distinguish FEs and BEs 2007-01-01 21:38:07 +01:00
log.h [BUILD] fix build on AIX due to recent log changes 2007-12-05 11:11:55 +01:00
polling.h [MAJOR] introduced speculative I/O with epoll() 2007-04-16 00:53:59 +02:00
proto_http.h [MEDIUM] add support for conditional HTTP redirection 2008-06-07 23:08:56 +02:00
protocols.h [MEDIUM] support fully transparent proxy on Linux (USE_LINUX_TPROXY) 2008-01-13 14:49:51 +01:00
proxy.h [MEDIUM] add support for conditional HTTP redirection 2008-06-07 23:08:56 +02:00
queue.h [MAJOR] ported pendconn to mempools v2 2007-05-13 20:19:55 +02:00
server.h [BUG] fix the dequeuing logic to ensure that all requests get served 2008-06-20 15:08:06 +02:00
session.h [BUG] fix the dequeuing logic to ensure that all requests get served 2008-06-20 15:08:06 +02:00
task.h [MAJOR] migrated task, tree64 and session to pool2 2007-05-13 19:43:47 +02:00
template.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00