Appweb HTTP/2 Support
Appweb Version 8 introduces HTTP/2 support for a faster embedded web.
HTTP/2 is a faster, more efficient version of the venerable HTTP/1 protocol. It is supported by all major browsers and most major web sites. It was standardized in 2015 and published as RFC 7540.
Appweb is the first embedded web server to deliver a compact and robust implementation of HTTP/2 in an embedded web server. As HTTP/2 is a binary protocol with major new features, it requires a completely new HTTP protocol engine. Appweb version 8 includes an optimized embedded HTTP/2 engine for without significantly increasing memory footprint.
HTTP is a major revision to the HTTP protocol that supercedes the HTTP/1.1 standard. HTTP/2 is a compatible at the application layer, but utilizes a completely new binary protocol with header compression and multiplexing of requests over a single network connection for increased throughput and decreased latency.
The application level HTTP methods, URI syntax, header fields and status codes are unchanged, so web applications should not need modification to receive the benefits of HTTP/2. For Appweb, ESP, PHP, CGI and Action handler applications should not need modification. Custom Appweb handlers and modules may need some minor modifications to use some of the newer internal APIs. See Migrating to Appweb 8 for more details.
HTTP/2 solves two major performance bottlenecks of HTTP/1:
- Head of line blocking
- Many socket connections per site
HTTP/1 serializes web requests and cannot serve simultaneous resources without opening multiple network connections. If one resource is slow, loading subsequent resources are delayed. This is called the head-of-line blocking problem. HTTP/2 solves this by multiplexing multiple requests over a single network connection. By reducing the number of network connections, HTTP/2 reduces the per-client load on sites. For embedded devices, the use of HTTP/2 slashes the number of network connections and reduces the latencies incurred by negotiating multiple SSL connections.
The initial beta release of HTTP/2 implements the HTTP/2 binary protocol, request multiplexing and HPACK header optimization with tokenization and Huffman compression. Server push and request priorities will be delivered in a future release.
Appweb HTTP/2 supports the “h2” protocol which is HTTP/2 over TLS with protocol negotiation via TLS ALPN. Appweb supports both server side and client side of HTTP/2.
The Appweb “http” client test program fully supports HTTP/2 and can be used to exercise, test and load test Appweb.