nghttp2.org

HTTP/2 C library and tools

Nghttp2 v0.7.4

We released nghttp2 v0.7.4. This release still uses h2-14 identifier in library code.

In this release, we fixed few corner case bugs in the library code.

We rewrite nghttp’s --stat option output completely. It now shows the timings of request and completion of each resources:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ nghttp -nas https://nghttp2.org
***** Statistics *****

Request timing:
  complete: relative time from protocol handshake to stream close
   request: relative   time  from   protocol   handshake  to   request
            transmission.  If '*' is shown, this was pushed by server.
   process: time for request and response
      code: HTTP status code
      size: number  of   bytes  received  as  response   body  without
            inflation.
       URI: request URI

sorted by 'complete'

complete  request    process  code size request path
 +12.76ms     +118us  12.65ms  200   9K /
 +20.75ms * +10.51ms  10.23ms  200   8K /stylesheets/screen.css
 +32.89ms   +12.86ms  20.03ms  200   3K /javascripts/octopress.js
 +33.12ms   +12.86ms  20.26ms  200   3K /javascripts/modernizr-2.0.js
+124.05ms   +12.87ms 111.18ms  200 171K /images/posts/with-pri-blog.png
+150.66ms   +12.86ms 137.80ms  200 174K /images/posts/without-pri-blog.png

The list is sorted by complete time, that is time point its stream was closed. Notice that request field of /stylesheets/screen.css has *, which means that it was pushed by server.

nghttpd has a bug that multiple -p option won’t work, but it is not fixed.

As we wrote in nghttp2.org enabled HTTP/2 server push, nghttpx gets HTTP/2 server push support by inspecting Link header field from backend server. nghttpx now rewrites Host and :authority header fields when forwarding to backend server by default. --no-host-rewrite option to disable it.

h2load now shows time for request min, max, mean and standard deviation:

1
2
3
4
5
6
finished in 7.10s, 14092 req/s, 55.67MB/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 414200800 bytes total, 2723100 bytes headers, 409600000 bytes data
                     min         max         mean         sd        +/- sd
time for request:   283.86ms       1.46s    659.70ms    150.87ms    84.68%

To make command-line operation easier, we added bash_completion files for nghttp, nghttpd, nghttpx and h2load. They reside in doc/bash_completion directory.