About H2O
Key Features
- HTTP/1.0, HTTP/1.1
- uses PicoHTTPParser
- HTTP/2
- supports the final version1
- negotiation methods: NPN, ALPN, Upgrade, direct
- dependency and weight-based prioritization, with tweaks for Google Chrome
- server push
- WebSocket2
- TCP Fast Open
- TLS
- static file serving
- conditional GETs and range requests
- directory listing
- mime-type configuration
- FastCGI
- path-based and extension-based configuration
- starts / stops the process manager automatically
- reverse proxy
- HTTP/1.x only6
- persistent upstream connection with hostname lookups
- URL rewriting
- delegation-based (no need to use regular expressions)
- recognizes
X-Reproxy-URL
header sent by web applications
- access-logging
- apache-like format strings
- graceful restart and self-upgrade
Benchmark
First-paint Time Benchmark
First-paint time (time spent until the web browser starts rendering the new page) is an important metric in web-site performance. The metric is becoming even more important as access from mobile networks become the majority, due to its latency and narrow bandwidth.
The chart below compares the first-paint times of different web browsers / HTTP servers on network with latency of 100 milliseconds (typical for 4G mobile network). H2O reduces the time by a large margin, by fully implementing the prioritization logic defined by HTTP/2 and with tweaks to adjust the behavior of the web browsers7.
Remote Benchmark
Below chart shows the scores recorded on Amazon EC2 running two c3.8xlarge instances (server and client) on a single network placement8.
Local Benchmarks
The scores (requests/second.core) were recorded on Ubuntu 14.04 (x86-64) / VMware Fusion 7.1.0 / OS X 10.9.5 / MacBook Pro 15" Early 2013.
Server \ size of content | 6 bytes | 4,096 bytes |
---|---|---|
h2o/0.9.0 | 75,483 | 59,673 |
nginx/1.7.9 | 37,289 | 43,988 |
Server \ size of content | 6 bytes | 4,096 bytes |
---|---|---|
h2o/0.9.0 | 272,300 | 116,022 |
tiny-nghttpd (nghttpd@ab1dd11) | 198,018 | 93,868 |
trusterd@cff8e15 | 167,306 | 67,600 |
Notes:
- also supports draft 14 and 16 for compatibility
- only usable at library level
- internal memory is used as the storage
- ref: Do the ChaCha: better mobile performance with cryptography
- automatically enabled
- HTTPS is not supported
- benchmark details are explained in HTTP/2 (and H2O) improves user experience over HTTP/1.1 or SPDY
- for reverse-proxy tests, another H2O process running on the same host was used as the upstream server
- used command:
wrk -c 500 -d 30 -t 1
; configuration file of nginx is here - used command:
h2load -c 500 -m 100 -n 2000000
; configuration file of h2o is here