The African villages are in South America!
mod_spdy
nghttp2
, test with curl
Jan - July 2015
Pioneered by Matthew Steele and Bryan McQuade!
Many Thanks to Tatsuhiro Tsujikawa and Daniel Stenberg!
Donated by GSMA and greenbytes in July
Evolution of mod_h2
performance.
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | # streams |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | mod_h2 |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | mod_h2 |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | mod_h2 |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | mod_h2 |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | mod_h2 |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | mod_h2 |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | mod_h2 |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | mod_h2 |
Processing a h2 connection is vastly different in terms of (Connection/Request/Thread).
1-1-1
(http/1)1-n-m
(h2)In h2, 1 connection has n
ongoing request, worked on by m
threads.
Existing runtimes are optimized for 1-1-1
Not new, but different.
Server manage resources/connection. h2 adds two order of magnitude.
Keeping file handles open reduces buffer copies.
Connection fairness vs. priority handling.
Many parameters in play, what to optimize for?
2k | 4k | 8k | 16k | 64k* |
Write Sizes |
max streams, window sizes, priorities, processing modules, worker capacities, buffer sizes...
Ultimately: Cycles/Request
Requesting different resource sizes.
1 Gbps ethernet, Core i5 2010 server.
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 40 | 100 |
# streams |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 40 | 100 |
# streams |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 40 | 100 |
# streams |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 40 | 100 |
# streams |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 40 | 100 |
# streams |
Best: mpm_prefork + 1 worker
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | # streams |
1 | 2 | 5 | 10 | 20 | 40 | 100 | |
http/1 | # streams |
But best in what exactly?
Transfer of 10 MB resources
http | h2c | https | h2+prefork | h2+worker |
Measured on localhost: buffer copies, encryption.
"You're off the edge of the map, mate. Here there be monsters."
How do YOU do it?
RFC 7540 compliance configured, not coded.
Direct
on any connection startSSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK
New game: 421 ping pong!
Sponsoring Needed!
mod_h2
httpd/2.4.x