H2O - 一个超快的 HTTP 服务器(C 实现)

About H2O

H2O is a very fast HTTP server written in C. It can also be used as a library.

Key Features

  • HTTP/1.0, HTTP/1.1
  • HTTP/2
    • supports the final version 1
    • negotiation methods: NPN, ALPN, Upgrade, direct
    • dependency and weight-based prioritization
    • server push
  • WebSocket 2
  • TLS
    • uses OpenSSL or LibreSSL
    • forward secrecy
    • AEAD ciphers including the upcoming ones preferred by Google Chrome 3
    • OCSP stapling 4
    • session resumption and session tickets 5
  • static file serving
    • conditional GET using last-modified / etag
    • directory listing
    • mime-type configuration
  • reverse proxy
    • HTTP/1.x only 6
    • persistent upstream connection
  • access-logging
    • apache-like format strings
  • graceful restart and self-upgrade

Benchmark

Remote Benchmark

Below chart shows the scores recorded on Amazon EC2 running two c3.8xlarge instances (server and client) on a single network placement 7.

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.

HTTP/1.1 8
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
HTTP/2 9
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:

  1. also supports draft 14 and 16 for compatibility
  2. only usable at library level
  3. chacha20-poly1305; see also: Do the ChaCha: better mobile performance with cryptography
  4. automatically enabled
  5. internal memory is used as the storage
  6. HTTPS is not supported
  7. for reverse-proxy tests, another H2O process running on the same host was used as the upstream server
  8. used command: wrk -c 500 -d 30 -t 1; configuration file of nginx is here
  1. used command: h2load -c 500 -m 100 -n 2000000; configuration file of h2o is here
From:https://h2o.github.io/
全部评论

相关推荐

感性的干饭人在线蹲牛友:🐮 应该是在嘉定这边叭,禾赛大楼挺好看的
点赞 评论 收藏
分享
某牛奶:一觉醒来全球程序员能力下降200%,小伙成功scanf惊呆在座个人。
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务