Today I am happy to announce the release of the
H2O HTTP/2 server
version 1.4.0.
There have been a few changes and bug fixes from version 1.3.1 (that showed
big performance improvements over the older generations of HTTP servers without support for request prioritization), but the most prominent ones are the following.
Support for the PROXY protocol
The PROXY protocol is a de-facto standard protocol used by L4 load balancers (such as
AWS Elastic Load Balancing) to notify the web servers running behind them the IP addresses of the clients. Support for the protocol is essential for running a web server behind such load balancer; without the support it is impossible to log the address of the client or to work against attacks.
In version 1.4.0, we have added support for the protocol which makes H2O a good choice for large scale and/or highly-available web sites running multiple HTTP servers behind a load balancer.
Support for cache-based and ticket-based TLS session resumption using Memcached (and forward secrecy)
The PROXY protocol is not the only thing that now makes H2O a good choice for such websites.
When running a HTTPS server cluster behind a L4 load balancer, it is desirable that the server supports session resumption using a shared datastore such as memcached.
TLS Session Resumption: Full-speed and Secure is a good read for those who are interested in what session resumption is; in short, it reduces the time spent for establishing a TLS connection to about half, and also reduces the CPU time to below 10%!
However, until now, front-end HTTP servers have been not good at supporting session resumption using a shared datastore.
Among the two resumption methods, Nginx does not support the more-widely-deployed cache-based session resumption using a shared datastore.
It should also be noted that most web servers are not good at supporting ticket-based resumption; they use 128-bit AES for storing master secrets (even in cases when a more complex ciphersuite is used), and
also do not automatically roll-over the secrets (which botches forward-secrecy).
As pointed out by
Tim Taubert,
the sad state of the server-side TLS session resumption implementations has been the headache of administrators trying to setup secure websites.
Forward Secrecy at Twitter is an example that shows how difficult it is to configure a website supporting forward-secrecy.
Being the primary developer of H2O, I believe that
web servers should be easily configurable to be secure; so in version 1.4.0 we have implemented the following features:
- cache-based session resumption using memcached
- automatic rollover of master secret used for ticket-based resumption
- synchronization of master secrets that rollover, using memcached
- directive to configure the cipher used for encrypting tickets (with default being
aes-256-cbc
)
Table 1.Supported Methods of Session Resumption
| Resumption Method |
| Session Resumption | Session Ticket |
Apache (prefork) | yes | no forward-secrecy (AES-128) |
Apache (worker) | yes | no forward-secrecy (AES-128) |
Apache (event) | not sharable | no forward-secrecy (AES-128) |
Nginx | not sharable | no forward-secrecy (AES-128) |
Varnish (hitch) | needs recompile | no |
H2O | yes | yes (AES-256) |
And with H2O, they are easy to use! A simple configuration like below activates all the features. The H2O server cluster will share information of both cache-based and ticket-based session resumption using memcached, with complex cipher used for protecting master secrets that are automatically rolled over.
listen:
port: 443
ssl:
key-file: /path/to/key-file
certificate-file: /path/to/certificate-file
proxy-protocol: ON
ssl-session-resumption:
method: all
memcached:
host: address.of.memcached.server
port: 11211
Please refer to the
documentation for the details of the configuration directive.
Experimental mruby Handler
We are also proud to announce that we now have a scripting engine running within the H2O standalone server that can be used to customize the behavior, and that the programming language is Ruby.
Developed by
Yukihiro Matz (the father of the
Ruby programming language) and others,
mruby is an implementation of the language for embedded use. Thanks to
MATSUMOTO Ryosuke the language runtime can now be used to script how the HTTP requests should be handled within H2O.
The handler is still in very early stages and considered unstable (therefore it is not turned on by default, you would need to pass
-DWITH_MRUBY=ON
as an argument to CMake to build H2O with support for the mruby handler), but nevertheless it is already a great addition to the H2O HTTP server; such a scripting engine gives you great flexibility to customize the behavior of the server depending on the tiny aspects of a HTTP request, or to mitigate attacks.
Please refer to
Ryosuke's weblog for more information (in Japanese). In addition to topics related to H2O, you can find excellent entries about how to use a scripting engine within web servers to work against cyber attacks.
Conclusion
All in all, we are happy to provide a new release of the H2O server to the public, that is secure and easy to use (with flexibility), once again raising the bar of what people should expect on a HTTP server to provide.
I hope you enjoy using the new release of H2O.