GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sysalexis/h2o: H2O - an optimized HTTP server with support for HTTP/1.x and HTTP/2

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

725 Commits
725 Commits

Folders and files

NameName
Last commit message
Last commit date
cmake
cmake
 
 
deps
deps
 
 
examples
examples
 
 
h2o.xcodeproj
h2o.xcodeproj
 
 
include
include
 
 
lib
lib
 
 
misc
misc
 
 
src
src
 
 
t
t
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.travis.yml
.travis.yml
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

H2O - an optimized HTTP server with support for HTTP/1.x and HTTP/2

Build Status

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

Features

  • HTTP/1.0, HTTP/1.1
  • uses PicoHTTPParser
  • persistent connections
  • chunked encoding
  • HTTP/2
  • draft 14
  • negotiation methods: NPN, ALPN, Upgrade, direct
  • weight-based prioritization
  • WebSocket
  • uses wslay
  • only usable at library level
  • TLS
  • uses OpenSSL
  • forward secrecy
  • AEAD ciphers
  • session resumption (internal memory)
  • static file serving
  • conditional GET using last-modified / etag
  • directory listing
  • mime-type configuration
  • reverse proxy
  • HTTP/1 only (no HTTPS)
  • persistent upstream connection
  • access-logging
  • apache-like format strings
  • graceful restart and self-upgrade
  • via Server::Starter

Using the Standalone Server

Installation

Following softwares are required to build the standalone server. It is likely that you would be possible to find and install them as part of your operation system (by running yum, apt-get, brew, etc. depending on the OS).

  • cmake
  • libyaml
  • OpenSSL (1.0.2 or above is recommended)

Download and extract a source release from here, or clone the Git repository.

Run the commands below. The last command installs h2o (the standalone server) to usr/local.

$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local .
$ make
$ sudo make install

Running the Server

First, let's try running the server using a configuration file included in the examples/ directory. The command below invokes the standalone server using examples/h2o/h2o.conf, which directs the server to listen on port 8080. Try accessing http://127.0.0.1:8080/.

$ h2o -c examples/h2o/h2o.conf

Use --help to print a list of command line options and configuration directives that can be used.

$ ./h2o --help

Building the Library

H2O can also be used as a software library with libuv version 1.0.0. Note that prior versions of libuv cannot be used due to massive changes to the APIs in 1.0.0.

Examples can be found within the examples/ directory.

For the time being, using libh2o as a submodule is the recommend way.

$ cmake .
$ make libh2o

Benchmarks

Remote Benchmark

The scores were recorded on Amazon EC2 running two c3.8xlarge instances (server and client) on a single network placement.

benchmark results

note: for reverse-proxy tests, another H2O process running on the same host was used as the upstream server

Local Benchmark

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

Server \ size of content 6 bytes 4,096 bytes
h2o/0.9.0 75,483 59,673
nginx/1.7.9 (conf) 37,289 43,988

note: wrk -c 500 -d 30 -t 1

HTTP/2

Server \ size of content 6 bytes 4,096 bytes
h2o/0.9.0 (conf) 272,300 116,022
tiny-nghttpd (nghttpd @ ab1dd11) 198,018 93,868
trusterd @ cff8e15 147,400 46,627

note: h2load -c 500 -m 100 -n 2000000

Further Reading

  • Presentation slides at HTTP2 Conference - discusses the design of H2O and the motives behind
  • Kazuho's Weblog - the developers weblog (with H2O+in English tag, H2O+日本語 tag)

About

H2O - an optimized HTTP server with support for HTTP/1.x and HTTP/2

blog.kazuhooku.com/search/label/H2O+in%20English

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.