nghttp2.org

HTTP/2 C library and tools

HTTP/2 Draft-12 Update

We updated test server to the latest HTTP/2 draft-12 implementation.

As before, we service h2-12 at port 443 and h2c-12 at port 80. We also continue to support SPDY and HTTP/1. If http URI is used to access to this site, we issue ALTSVC frame and Alt-Svc header field to indicate that we also service same contents at port 443 in h2-12 protocol.

Let’s review the highlights of the changes in draft-12. The dependency based priority was introduced in draft-11. In draft-12, it is further enhanced (and simplified). nghttp2 fully implements dependency based priority mechanism. From our experience, we know that it is crucial to retain information of closed streams to make the prioritization work. This is also covered in the draft-12. nghttp2 retains closed streams as much as possible. The upper bound of the sum of active and retained closed streams are SETTINGS_MAX_CONCURRENT_STREAMS the server declares.

BLOCKED frame is newly introduced in draft-12. It indicates that DATA frame transfer is blocked due to exhaustion of flow control send window. nghttp2 implements transmission and reception of BLOCKED frame for both connection and stream level flow control.

Compressed DATA frame is introduced in draft-12. This is supposed to be a replacement of Transfer-Encoding: gzip in HTTP/1. nghttp2 supports compressed DATA frame in its library API. But the public test server does not support compress DATA frame at the moment.

To access this site via HTTP/2, you can use nghttp client included in nghttp2 repository. It works with both https and http URI. node-http2 client may also work.

The easiest way to test HTTP/2 is use h2-12 enabled Firefox browser. You can find the download link from here. Don’t forget to set network.http.spdy.enabled.http2draft and security.ssl.enable_alpn to true in about:config screen. Please note that Firefox only supports HTTP/2 in https URI.

H2load Now Supports SPDY in Clear Text

We added -p and --no-tls-proto option to h2load in order to support SPDY in clear text.

Previously h2load supports SPDY only for https URI. This is because SPDY has no mechanism to negotiate its protocol version without ALPN/NPN. With -p option, user can specify the ALPN identifier to use when http URI (in clear text) is used.

Almost all SPDY enabled public web servers are now deployed with SSL/TLS. But inside the server farm, between SSL/TLS terminator and backend server may communicate SPDY in clear text. This option is very handy to perform load tests for those SPDY servers.

nghttp2.org Goes Live

Now this nghttp2 public test server can be accessible via nghttp2.org and you don’t have to remember cryptic IP address. The SSL/TLS certificate is still self-signed, we are preparing valid one so stay tuned.

Let me summarize the current status of the public test server. The supported HTTP/2 protocol is HTTP/2 draft-11.

We offer HTTP/2 over TLS, identified by h2-11 in ALPN, at the port 443. We also offer SPDY/3.1 and HTTP/1.1 on that port as a fallback. Again, the certificate is self-signed at the time of this writing.

We offer HTTP/2 over (plain, non-encrypted) TCP, identified by h2c-11, at the port 80. We also offer HTTP/1.1 on that port as a fallback. We support HTTP Upgrade in HTTP/1.1 connection to HTTP/2. The details of how to perform HTTP Upgrade from HTTP/1.1 to HTTP/2 is described in here. We advertise h2-11 in Alt-Svc header field and ALTSVC HTTP/2 frame on this port.

You can use nghttp CLI client, which is included in nghttp2 repository, to access to both services.

At the time of this writing, “special build” Mozilla Firefox is the only web browser that can speak h2-11. You can find the link to download it in here. Firefox only supports https URI for HTTP/2. This means that there is no browser which can access to this site in plain, non-encrypted HTTP/2. You need to enable HTTP/2 and ALPN in about:config as described in the above link. You may also need to set security.use_mozillapkix_verification to false to access to this site (See here about this configuration parameter).