HAProxy 2.0-dev5 was released on 2019/06/02. It added 92 new commits
after version 2.0-dev4.

This version addresses a small number of no-to-trivial issues met while
working on fixing other bugs and during benchmarks.

One such issue concerns the excess of wakeup/sleep in the H2 mux since
1.9, due to the fact that the connection's mux buffer is the same size
as the streams' and that when forwarding large data, each stream is able
to fill the buffer and leave no more room to other ones. There are ways
to address this at the connection management level but this requires to
enforce new internal rules that were not necessarily strict enough yet,
and that would require to carefully recheck the code. This will be for
2.1. In the mean time, using a list of buffers (buffer ring) for the
connection was way easier and significantly improved the performance,
while taking advance on what was expected for 2.1 without taking much

We also noticed that some locks and some atomic operations in the scheduler
were taking a significant amount of time by causing lines to bounce between
all cores. While it's often irritating to see this, I'm reminding myself
that two years ago we were crossing fingers hoping that very basic multi-
threading would be completed in time for 1.8 and that now we've already
reached the point where bouncing CPU cache lines are the factor affecting
the scalability, so I must admit it's quite pleasant to revisit such parts
which were once consdered very fast, because now they're the bottlenecks!
Thus some locks were reviewed again and the ones which were really not
used anymore were released. Others have been identified to be reworked
in 2.1.

Another indicator that we're getting closer to the release is that we're
mostly facing bugs affecting stable releases as well. For example there
was another bug in the LB code where it's possible to loop forever on a
dead server, which also affects 1.9 and 1.8, the queue dispatching code
was bogus since 1.9, and we discovered that "http-request reject" rules
have never worked well...

Aside this, some improvements to the HTX code were made to better deal
with 1xx messages. Strictly speaking they were not required for this
version but I predicted that we'd face difficult to fix issues if we were
to postpone them for 2.1, and in practice we found corner cases which are
better addressed since these changes.

A user-visible change was made (I hate to do this but it has become a
real pain and we'll have more trouble if we don't address it now). It's
the presence of similarly-named servers in the config. I figured that 5
years later, we continue to warn instead of reject this. Given all the
dynamic stuff people are using, it creates a real havoc to still have to
deal with this, so better reject this now than letting people down this
breach for another 5 years.

The HTX performance was further increased by allowing zero-copy to be
performed when receiving an H2 message. This will be visible in H2 to
H2 scenarios mostly. In addition, the H2 performance appeared to be
horrible when configured with large buffers, due to a few remaining
bytes available after each message causing some realigns. This was now

The SOCKS4 upstream server code was merged. At the moment while SOCKS4
happens to work for me, it fails for its author (Alec) and his fix really
bothers me. While merging it we noticed that the current connection layer
is still affected by a few very dirty corner cases that I really don't
like. In short, the handshake code was never used to switch between
reading and writing till now. It's not a big deal since this code is going
to disappear soon, but when working on the replacement part, Olivier found
other deeper issues that I really want to see addressed. Just for this,
I'm expecting at least another -dev next week before a final release as we
can't afford to have dirty hacks in this area in an LTS version or we risk
to pay them the high price.

I just found while testing this release that "tcp-request inspect-delay"
doesn't work in HTTP+HTX mode (it does not wait). I don't know why yet,
but 1.9 has the same issue.

Overall most of the performance issues addressed in this version also
affect 1.9 and sometimes even 1.8, so we could expect that a few of them
will be backported later if they are of particular concern.

Now for the next steps, I'd like to emit another dev version this week
(Wednesday or Thursday depending how things go with the pending issues),
with the hope that we can do 2.0-final the week after, before the 15th.

Please find the usual URLs below :
   Site index       : http://www.haproxy.org/
   Discourse        : http://discourse.haproxy.org/
   Slack channel    : https://slack.haproxy.org/
   Issue tracker    : https://github.com/haproxy/haproxy/issues
   Sources          : http://www.haproxy.org/download/2.0/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/2.0/src/CHANGELOG
   Cyril's HTML doc : http://cbonte.github.io/haproxy-dconv/

Complete changelog :
Alexander Liu (1):
      MEDIUM: connection: Upstream SOCKS4 proxy support

Christopher Faulet (43):
      BUG/MINOR: proto-htx: Try to keep connections alive on redirect
      BUG/MEDIUM: spoe: Don't use the SPOE applet after releasing it
      BUG/MINOR: lua: Set right direction and flags on new HTTP objects
      BUG/MINOR: mux-h2: Count EOM in bytes sent when a HEADERS frame is 
      BUG/MINOR: mux-h1: Report EOI instead EOS on parsing error or H2 upgrade
      BUG/MEDIUM: proto-htx: Not forward too much data when 1xx reponses are 
      BUG/MINOR: htx: Remove a forgotten while loop in htx_defrag()
      MINOR: htx: Remove the macro IS_HTX_SMP() and always use IS_HTX_STRM() 
      MINOR: htx: Move the macro IS_HTX_STRM() in proto/stream.h
      MINOR: htx: Store the head position instead of the wrap one
      MINOR: htx: Store start-line block's position instead of address of its 
      MINOR: htx: Add functions to get the first block of an HTX message
      MINOR: mux-h2/htx: Get the start-line from the head when HEADERS frame is 
      MINOR: htx: Replace the function http_find_stline() by http_get_stline()
      CLEANUP: htx: Remove unused function htx_get_stline()
      MINOR: http/htx: Use sl_pos directly to replace the start-line
      MEDIUM: http/htx: Perform analysis relatively to the first block
      MINOR: channel/htx: Call channel_htx_recv_max() from channel_recv_max()
      MINOR: htx: Add function htx_get_max_blksz()
      BUG/MINOR: htx: Change htx_xfer_blk() to also count metadata
      MEDIUM: mux-h1: Use the count value received from the SI in h1_rcv_buf()
      MINOR: mux-h2: Use the count value received from the SI in h2_rcv_buf()
      MINOR: stream-int: Don't use the flag CO_RFL_KEEP_RSV anymore in 
      MINOR: connection: Remove the unused flag CO_RFL_KEEP_RSV
      MINOR: mux-h2/htx: Support zero-copy when possible in h2_rcv_buf()
      MINOR: htx: Add a field to set the memory used by headers in the HTX 
      MINOR: h2/htx: Set hdrs_bytes on the SL when an HTX message is produced
      MINOR: mux-h1: Set hdrs_bytes on the SL when an HTX message is produced
      MINOR: htx: Be sure to xfer all headers in one time in htx_xfer_blks()
      MEDIUM: htx: 1xx messages are now part of the final reponses
      MINOR: channel/htx: Add function to forward headers of an HTX message
      MINOR: filters/htx: Use channel_htx_fwd_headers() after headers filtering
      MINOR: proto-htx: Use channel_htx_fwd_headers() to forward 1xx responses
      MEDIUM: htx: Store the first block position instead of the start-line one
      MINOR: stats/htx: don't use the first block position but the head one
      MINOR: channel/htx: Add functions to forward a part or all HTX payload
      MINOR: proto-htx: Use channel_htx_fwd_all() when unfiltered body are 
      MEDIUM: filters/htx: Filter body relatively to the first block
      MINOR: htx: Optimize htx_drain() when all data are drained
      MINOR: htx: don't rely on htx_find_blk() anymore in the function 
      MINOR: htx: remove the unused function htx_find_blk()
      MINOR: htx: Remove support of pseudo headers because it is unused
      BUG/MEDIUM: mux-h1: Don't skip the TCP splicing when there is no more 
data to read

Ilya Shipitsin (2):
      BUG/MINOR: ssl_sock: Fix memory leak when disabling compression
      BUILD: ssl: fix latest LibreSSL reg-test error

Michael Prokop (1):
      DOC: fix typos

Olivier Houchard (6):
      MINOR: ssl: Make sure the underlying xprt's init method doesn't fail.
      MINOR: ssl: Don't forget to call the close method of the underlying xprt.
      MEDIUM: sessions: Introduce session flags.
      BUG/MEDIUM: h2: Don't forget to set h2s->cs to NULL after having free'd 
      BUG/MEDIUM: connection: Use the session to get the origin address if 
      MEDIUM: tasks: Get rid of active_tasks_mask.

Willy Tarreau (39):
      BUILD: watchdog: use si_value.sival_int, not si_int for the timer's value
      BUILD: signals: FreeBSD has SI_LWP instead of SI_TKILL
      BUILD: watchdog: condition it to USE_RT
      MINOR: raw_sock: report global traffic statistics
      MINOR: stats: report the global output bit rate in human readable form
      OPTIM: freq-ctr: don't take the date lock for most updates
      MEDIUM: mux-h2: avoid doing expensive buffer realigns when not absolutely 
      CLEANUP: debug: remove the TRACE() macro
      MINOR: buffer: introduce b_make() to make a buffer from its parameters
      MINOR: buffer: add a new buffer ring API to manipulate rings of buffers
      MEDIUM: mux-h2: replace all occurrences of mbuf with a buffer ring
      MEDIUM: mux-h2: make the conditions to send based on mbuf, not just its 
      MINOR: mux-h2: introduce h2_release_mbuf() to release all buffers in the 
mbuf ring
      MEDIUM: mux-h2: make the send() function iterate over all mux buffers
      CLEANUP: mux-h2: consistently use a local variable for the mbuf
      MINOR: mux-h2: report the mbuf's head and tail in "show fd"
      MAJOR: mux-h2: switch to next mux buffer on buffer full condition.
      BUILD: connections: shut up gcc about impossible out-of-bounds warning
      MINOR: cli/activity: remove "fd_del" and "fd_skip" from show activity
      MINOR: cli/activity: add 3 general purpose counters in development mode
      BUG/MAJOR: lb/threads: make sure the avoided server is not full on second 
      BUG/MEDIUM: queue: fix the tree walk in pendconn_redistribute.
      BUG/MEDIUM: threads: fix double-word CAS on non-optimized 32-bit platforms
      MEDIUM: config: now alert when two servers have the same name
      BUG/MEDIUM: http: fix "http-request reject" when not final
      MINOR: htx: rename htx_append_blk_value() to htx_add_data_atonce()
      MINOR: htx: make htx_add_data() return the transmitted byte count
      MEDIUM: htx: make htx_add_data() never defragment the buffer
      MINOR: activity: write totals on the "show activity" output
      MINOR: activity: report totals and average separately
      MEDIUM: poller: separate the wait time from the wake events
      MINOR: activity: report the number of failed pool/buffer allocations
      MEDIUM: buffers: relax the buffer lock a little bit
      MINOR: task: turn the WQ lock to an RW_LOCK
      MEDIUM: task: don't grab the WR lock just to check the WQ
      BUG/MEDIUM: mux-h2: fix the conditions to end the h2_send() loop
      BUG/MEDIUM: mux-h2: don't refrain from offering oneself a used buffer
      BUILD: contrib/prometheus: fix build breakage caused by move of idle_pct
      BUG/MINOR: deinit/threads: make hard-stop-after perform a clean exit


Reply via email to