Discussion:
[ANNOUNCE] haproxy-1.9-dev7
Willy Tarreau
2018-11-18 21:49:17 UTC
Permalink
Hi,

HAProxy 1.9-dev7 was released on 2018/11/18. It added 148 new commits
after version 1.9-dev6.

This version will come as a great relief for some of us. It finally
contains a big chunk of the HTX modifications we've tried to integrate
for about 2 months now. This also means that the stream-interface issues
could be addressed and that the initial rework of the outgoing connection
reuse was addressed as well. It would be an euphemism to say that such
deep changes usually come with a non-negligible risk of breakage. But
difficulty in getting these changes to work together has already given
us the opportunity to discover a number of issues and address some of
them before they were merged, so that's not bad.

Some more changes are expected to complete the connection reuse and some
parts of the HTX changes, but at least we really needed to get all that
together in order to start again to parallelize the work on these highly
conflicting areas.

With this current version, it's possible to have HTTP/1 keep-alive when
the frontend uses H2, with a temporary limitation to one reusable stream
per H2 connection (i.e. it mimmicks the H1 behaviour).

It's not yet possible to have H2 to the server but it should be doable
with reasonable effort thanks to HTX, to a certain extent. I'll work on
this depending on the amount of pending bugs that interrupt the progress.

HTX is the version-agnostic internal HTTP representation. It's used when
"option http-use-htx" is set in both the frontend and the backend. It still
has some bugs and limitations but lots of stuff was addressed already. Even
the stats page is implemented (but I'm having a bug upon the second request
per connection). The filters (compression etc) are not done yet. Neither
are the cache, nor Lua. I noticed redirects still freezing and keep-alive
sometimes being ignored (possibly due to the merge with the new connection
reuse updates).

Those curious may want to give it a try, but if you're lucky, you will
not notice any change, and if you're unlucky you'll see some breakage.
Christopher was masochist^H^H^H^H^H^H^H^H^Hprudent enough to let the two
HTTP implementations coexist side by side, which is also what significantly
complicates the task, but will be incredibly useful over time to help
migrate the entire code base and encourage adoption at the same time.

At the moment I noticed a performance drop of around 50% on byte rate, 50%
on request rate and 25% on connection rate. This is huge and partially
caused by the coexistence of the two stacks, but we'll work on this later.
The first and most important point is to get the basic infrastructure ready
to make it possible to start to build new features based on this for 2.0
and that we finish to convert everything to HTX so that in 2.1 we can
safely remove the old legacy code.

Aside these painful changes, there's a bit more clean stuff getting merged.

The latest master-worker updates make the old process' CLI accessible from
the master process. This will finally allow us to emit a "show sess" on an
old process which doesn't want to die!

We now have support for RFC8297, to emit code 103/Early Hints in order to
send browsers a list of links to objects to preload before the server even
starts to respond. At the moment support in browsers is still in progress,
but this will very likely become a nice alternative to PUSH in a short time.

The "log" statement now supports "fd@" as well as "stdout" and "stderr".
We figured a way to emit atomic log messages over pipes and sockets in a
non-blocking way using writev(). That's nice because it's much easier to
implement than the logging task with its dedicated buffer, and is fast
enough for most use cases where it matters. On my laptop I can get 22k
logs per second with no loss (and lost logs are now counted in show info).
This comes with two new log formats, "raw" (better for docker) and "short"
(better for systemd). No support was yet implemented for logging over TCP,
it's mainly a matter of configuration limitation (the address parser is
the same as for servers except that right now, an IP:port necessarily
means UDP for us). We'll see how to address this for 2.0, it's not urgent.

There's also a huge drop of doc fixes for typos and spelling mistakes
from Joseph Herlant. I know that some people don't feel comfortable with
tons of patches of that low importance, but the reasons I accepted them
are the following :
- spelling mistakes and typos in end-user documentation are not
acceptable and need to be addressed, especially if we want the
project to maintain its reputation of coming with extensive doc;

- spelling mistakes in the code and comments are a real pain to
to deal with, I don't count the number of times I failed to
find something because "outgoing" was spelled "ougoing" (today),
or "function" spelled "fucniont" etc, so these also make sense;

- we could encourage users to pass their patches through some tools
to help spot these, but without fixing the existing ones it's not
realistic as these will trigger all the time;

- such changes should be merged close to the release, not after or
they will complicate backports; merging all of this at once is like
a vaccine, it slightly harms only once and you don't have to think
about it anymore;

- I prefer to have them splitted by domain/subsystem so that if
some of them complicate some fix backports later, we can simply
backport the doc updates as well to adjust the context without
having to needlessly complicate our maintenance life;

- this will be an incentive for everyone to be more careful in the
future, for the good of every contributor, reviewer or stable
maintainer.

- and finally, it's a painful job to do, it's not every year that
we have such an offer from someone willing to do this, so it's now
or never to take it!

Now let's talk about the next steps. Some more work is planned on the
connection reuse front in order to support per-server pools to optimize
connection reuse. I'd also like to convert the H2 mux to htx, allowing
H2 connections to servers, hoping it will not require to duplicate the
code into one extra mux, otherwise I may postpone for after 1.9. It also
requires server-side ALPN and I vaguely remember something funny about
it. I don't know what is still expected for 1.9 on HTX, I think the
functional coverage is already quite good for a technical release. I
still need to merge the timing code I wrote months ago, and to split
cfgparse into 3 smaller parts for faster compile (already done in a
branch). I would have liked to implement support for basic ifdef/endif
in the config parser to ease porting of tests between versions, but I
don't know if we'll have the time for this. I'd like us to focus more on
writing tests, polish comments a bit (get rid of the many FIXME and
XXX inserted here and there once it's verified they were addressed,
AND INDICATE WHAT MODIFIED FUNCTIONS ARE SUPPOSED TO TAKE AND RETURN),
document a bit the new internals while it's still fresh in our heads,
and see if we can find a way to write HTTP tests which run both with and
without HTX without having to duplicate all tests. Ideally I'd like to
see some varnishtest files for all the HTTP features already ported to
HTX. This will make all of us feel more confident in what's being
released, and will necessarily reveal some burried bugs.

Given that there's less than two weeks before the end of the month and
that we didn't manage to merge earlier this week, I don't believe in a
release before the end of the month anymore. *If* everything goes well,
we can possibly hope for the first week of December, after what I'll
probably take 2 or 3 years of vacation to recover :-) But that's already
a big "if" considering that a number of the lower layer bugs we've had
to deal with can easily take one week to address by being deeply rooted
in the code!

But we're never been closer and that's what matters :-)

Please find the usual URLs below :
Site index : http://www.haproxy.org/
Discourse : http://discourse.haproxy.org/
Sources : http://www.haproxy.org/download/1.9/src/
Git repository : http://git.haproxy.org/git/haproxy.git/
Git Web browsing : http://git.haproxy.org/?p=haproxy.git
Changelog : http://www.haproxy.org/download/1.9/src/CHANGELOG
Cyril's HTML doc : http://cbonte.github.io/haproxy-dconv/

Willy
---
Complete changelog :
Christopher Faulet (49):
BUG/MINOR: http_fetch: Remove the version part when capturing the request uri
MINOR: http: Regroup return statements of http_req_get_intercept_rule at the end
MINOR: http: Regroup return statements of http_res_get_intercept_rule at the end
BUG/MINOR: http: Be sure to sent fully formed HTTP 103 responses
BUG/MINOR: config: Copy default error messages when parsing of a backend starts
MINOR: conn_stream: Add a flag to notify the mux it should flush its buffers
MINOR: htx: Add proto_htx.c file
MINOR: conn_stream: Add a flag to notify the mux it must respect the reserve
MINOR: http: Add standalone functions to parse a start-line or a header
MINOR: http: Call http_send_name_header with the stream instead of the txn
MINOR: conn_stream: Add a flag to notify the SI some data were received
MINOR: http: Add macros to check if a stream uses the HTX representation
MEDIUM: proto_htx: Add HTX analyzers and use it when the mux H1 is used
MEDIUM: mux-h1: Add dummy mux to handle HTTP/1.1 connections
MEDIUM: mux-h1: Add parsing of incoming and ougoing HTTP messages
MAJOR: mux-h1/proto_htx: Handle keep-alive connections in the mux
MEDIUM: mux-h1: Add support of the kernel TCP splicing to forward data
MEDIUM: htx: Add API to deal with the internal representation of HTTP messages
MINOR: http_htx: Add functions to manipulate HTX messages in http_htx.c
MINOR: proto_htx: Add some functions to handle HTX messages
MAJOR: mux-h1/proto_htx: Switch mux-h1 and HTX analyzers on the HTX representation
MINOR: http_htx: Add functions to replace part of the start-line
MINOR: http_htx: Add functions to retrieve a specific occurrence of a header
MINOR: proto_htx: Rewrite htx_apply_redirect_rule to handle HTX messages
MINOR: proto_htx: Add the internal function htx_del_hdr_value
MINOR: proto_htx: Add the internal function htx_fmt_res_line
MINOR: proto_htx: Add functions htx_transform_header and htx_transform_header_str
MINOR: proto_htx: Add functions htx_req_replace_stline and htx_res_set_status
MINOR: proto_htx: Add function to build and send HTTP 103 responses
MINOR: proto_htx: Add functions htx_req_get_intercept_rule and htx_res_get_intercept_rule
MINOR: proto_htx: Add functions to apply req* and rsp* rules on HTX messages
MINOR: proto_htx: Add functions to manage cookies on HTX messages
MINOR: proto_htx: Add functions to check the cacheability of HTX messages
MINOR: proto_htx: Add functions htx_send_name_header
MINOR: proto_htx: Add functions htx_perform_server_redirect
MINOR: proto_htx: Add functions to handle the stats applet
MEDIUM: proto_htx: Adapt htx_process_req_common to handle HTX messages
MEDIUM: proto_htx: Adapt htx_process_request to handle HTX messages
MINOR: proto_htx: Adapt htx_process_tarpit to handle HTX messages
MEDIUM: proto_htx: Adapt htx_wait_for_request_body to handle HTX messages
MEDIUM: proto_htx: Adapt htx_process_res_common to handle HTX messages
MINOR: http_fetch: Add smp_prefetch_htx
MEDIUM: http_fetch: Adapt all fetches to handle HTX messages
MEDIUM: mux-h1: Wait for connection establishment before consuming channel's data
MINOR: stats/htx: Adapt the stats applet to handle HTX messages
MINOR: stream: Don't reset sov value with HTX messages
MEDIUM: mux-h1: Handle errors and timeouts in the stream
MINOR: filters/htx: Forbid filters when the HTX is enabled on a proxy
MINOR: lua/htx: Forbid lua usage when the HTX is enabled on a proxy

David Carlier (1):
BUILD/MEDIUM: threads/affinity: DragonFly build fix

Frédéric Lécaille (5):
MINOR: http: Add new "early-hint" http-request action.
MINOR: http: Make new "early-hint" http-request action really be parsed.
MINOR: http: Implement "early-hint" http request rules.
MINOR: doc: Add information about "early-hint" http-request action.
DOC: early-hints: fix truncated line.

Joseph Herlant (43):
CLEANUP: fix typos in the comments of the Makefile
CLEANUP: fix a typo in a comment for the contrib/halog subsystem
CLEANUP: fix typos in comments for the contrib/modsecurity subsystem
CLEANUP: fix typos in comments for contrib/spoa_example
CLEANUP: fix typos in comments for contrib/wireshark-dissectors
DOC: Fix typos in README and CONTRIBUTING
CLEANUP: Fix some typos in the haproxy subsystem
CLEANUP: Fix typos in the dns subsystem
CLEANUP: Fix typos in the pattern subsystem
CLEANUP: fix 2 typos in the xxhash subsystem
CLEANUP: fix a few typos in the comments of the server subsystem
CLEANUP: fix a misspell in tests/filltab25.c
CLEANUP: fix a typo found in the stream subsystem
CLEANUP: fix typos in comments in ebtree
CLEANUP: fix typos in reg-tests
CLEANUP: fix typos in the comments of the vars subsystem
CLEANUP: fix typos in the hlua_fcn subsystem
CLEANUP: fix typos in the proto_http subsystem
CLEANUP: fix typos in the proxy subsystem
CLEANUP: fix typos in the ssl_sock subsystem
DOC: Fix typos in different subsections of the documentation
DOC: fix a few typos in the documentation
MINOR: Fix an error message thrown when we run out of memory
MINOR: Fix typos in error messages in the proxy subsystem
MINOR: fix typos in the examples files
CLEANUP: Fix a typo in the stats subsystem
CLEANUP: Fix typos in the acl subsystem
CLEANUP: Fix typos in the cache subsystem
CLEANUP: Fix typos in the cfgparse subsystem
CLEANUP: Fix typos in the filters subsystem
CLEANUP: Fix typos in the http subsystem
CLEANUP: Fix typos in the log subsystem
CLEANUP: Fix typos in the peers subsystem
CLEANUP: Fix typos in the regex subsystem
CLEANUP: Fix typos in the sample subsystem
CLEANUP: Fix typos in the spoe subsystem
CLEANUP: Fix typos in the standard subsystem
CLEANUP: Fix typos in the stick_table subsystem
CLEANUP: Fix typos in the task subsystem
MINOR: Fix typo in error message in the standard subsystem
CLEANUP: fix typos in the comments of hlua
MINOR: Fix typo in the error 500 output of hlua
MINOR: Fix a typo in a warning message in the spoe subsystem

Olivier Houchard (7):
BUG/MEDIUM: Make sure stksess is properly aligned.
MEDIUM: connections: Wait until the connection is established to try to recv.
MEDIUM: mux: Teach the mux_pt how to deal with idle connections.
MINOR: mux: Add a new "avail_streams" method.
MINOR: mux: Add a destroy() method.
MINOR: sessions: Start to store the outgoing connection in sessions.
MAJOR: connections: Detach connections from streams.

William Lallemand (5):
MINOR: mworker: only close std{in,out,err} in daemon mode
BUG/MEDIUM: log: don't CLOEXEC the inherited FDs
MEDIUM: jobs: support unstoppable jobs for soft stop
MEDIUM: listeners: support unstoppable listener
MEDIUM: cli: worker socketpair is unstoppable

Willy Tarreau (38):
BUILD: cache: fix a build warning regarding too large an integer for the age
MINOR: log: slightly improve error message syntax on log failure
DOC: logs: the format directive was missing from the second log part
MINOR: log: report the number of dropped logs in the stats
MEDIUM: log: add support for logging to existing file descriptors
MEDIUM: log: support a new "short" format
MEDIUM: log: add a new "raw" format
BUG/MEDIUM: stream-int: change the way buffer room is requested by a stream-int
BUG/MEDIUM: stream-int: convert some co_data() checks to channel_is_empty()
MINOR: namespaces: don't build namespace.c if disabled
BUG/MEDIUM: stream-int: make failed splice_in always subscribe to recv
BUG/MEDIUM: stream-int: clear CO_FL_WAIT_ROOM after splicing data in
BUG/MINOR: stream-int: make sure not to go through the rcv_buf path after splice()
CONTRIB: debug: fix build related to conn_stream flags change
REGTEST: fix scripts 1 and 3 to accept development version
BUG/MINOR: stream-int: set SI_FL_WANT_PUT in sess_establish()
MINOR: stream: move the conn_stream specific calls to the stream-int
CLEANUP: h2: minimum documentation for recent API changes
MINOR: mux: implement a get_first_cs() method
MINOR: stream-int: make conn_si_send_proxy() use cs_get_first()
MINOR: stream-int: relax the forwarding rules in stream_int_notify()
MINOR: stream-int: expand the flags to 32-bit
MINOR: stream-int: rename SI_FL_WAIT_ROOM to SI_FL_RXBLK_ROOM
MINOR: stream-int: introduce new SI_FL_RXBLK flags
MINOR: stream-int: add new functions si_{rx,tx}_{blocked,endp_ready}()
MINOR: stream-int: replace SI_FL_WANT_PUT with !SI_FL_RX_WAIT_EP
MINOR: stream-int: use si_rx_blocked()/si_tx_blocked() to check readiness
MEDIUM: stream-int: use si_rx_buff_{rdy,blk} to report buffer readiness
MINOR: stream-int: replace si_{want,stop}_put() with si_rx_endp_{more,done}()
MEDIUM: stream-int: update the endp polling status only at the end of si_cs_recv()
MINOR: stream-int: make si_sync_recv() simply check ENDP before si_cs_recv()
MINOR: stream-int: automatically mark applets as ready if they block on the channel
MEDIUM: stream-int: fix the si_cant_put() calls used for end point readiness
MEDIUM: stream-int: fix the si_cant_put() calls used for buffer readiness
MEDIUM: stream-int: use si_rx_shut_blk() to indicate the SI is closed
MEDIUM: stream-int: unconditionally call si_chk_rcv() in update and notify
MEDIUM: stream-int: make use of si_rx_chan_{rdy,blk} to control the stream-int from the channel
MINOR: stream-int: replace si_cant_put() with si_rx_room_{blk,rdy}()

---

Loading...