]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MAJOR] complete layer4/7 separation
authorWilly Tarreau <w@1wt.eu>
Sun, 30 Nov 2008 17:14:12 +0000 (18:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 30 Nov 2008 17:14:12 +0000 (18:14 +0100)
commitfe3718ab793a6e55954a8b8cfc25a4a7a2460352
treefcb5db83822fa1605c225cd0ee9e991a8adf9a6d
parent99126c35c1c9b21e21748e1a1d9680524227daaa
[MAJOR] complete layer4/7 separation

All the processing has now completely been split in layers. As of
now, everything is still in process_session() which is not the right
place, but the code sequence works. Timeouts, retries, errors, all
work.

The shutdown sequence has been strictly applied: BF_SHUTR/BF_SHUTW
are only assigned by lower layers. Upper layers can only indicate
their wish to close using BF_SHUTR_NOW and BF_SHUTW_NOW.

When a shutdown is performed on a stream interface, the buffer flags
are updated accordingly and re-checked by upper layers. A lot of care
has been taken to ensure that aborts during intermediate connection
setups are correctly handled and shutdowns correctly propagated to
both buffers.

A future evolution would consist in ensuring that BF_SHUT?_NOW may
be set at any time, and applies only when the buffer is empty. This
might help with error messages, but might complicate the processing
of data remaining in buffers.

Some useless buffer flag combinations have been removed.

Stat counters are still broken (eg: per-server total number of sessions).

Error messages should be delayed to the close instant and be produced by
protocol.

Many functions must now move to proper locations.
include/proto/buffers.h
include/types/buffers.h
src/proto_http.c
src/stream_interface.c
src/stream_sock.c