A Go implementation of the HTTP/2 protocol.
It is useful for client/server application development using the HTTP/2 connection/stream directly.
currently under heavy development.
- Server/Client Connection
- Negotiation (ALPN, Upgrade)
- Flow Control
- Multiplexing without head-of-line blocking
- Graceful Shutdown
- Golang 1.5+
go get github.com/nekolunar/http2
- 2.2 GHz Intel Core i7
- 16 GB 1600 MHz DDR3
- Concurrency: C(1|8|64|512)
- Request/Response Data Length: 1024 Bytes
go test -bench BenchmarkConnReadWriteTLS -benchmem
BenchmarkConnReadWriteTLS_1K_C1-8 50000 33666 ns/op 4083 B/op 32 allocs/op
BenchmarkConnReadWriteTLS_1K_C8-8 50000 34544 ns/op 4080 B/op 32 allocs/op
BenchmarkConnReadWriteTLS_1K_C64-8 50000 34277 ns/op 4058 B/op 32 allocs/op
BenchmarkConnReadWriteTLS_1K_C512-8 50000 33966 ns/op 3880 B/op 30 allocs/op
go test -bench BenchmarkConnReadWriteTCP -benchmem
BenchmarkConnReadWriteTCP_1K_C1-8 50000 30090 ns/op 4065 B/op 32 allocs/op
BenchmarkConnReadWriteTCP_1K_C8-8 50000 30610 ns/op 4062 B/op 32 allocs/op
BenchmarkConnReadWriteTCP_1K_C64-8 50000 30673 ns/op 4040 B/op 32 allocs/op
BenchmarkConnReadWriteTCP_1K_C512-8 100000 30715 ns/op 3965 B/op 31 allocs/op
MIT license. See LICENSE for details.