Skip to content

jcreixell/finagle-http2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enabling HTTP/2 in Finagle

Example of enabling HTTP/2 in Finagle via toggle.

Usage

Server

Run the server with:

$ sbt "runMain com.jcreixell.finaglehttp2.Server"

Test it with curl (make sure it is compiled with support for nghttp2):

$ curl --http2 -v localhost:8080

Client

Run the client with:

$ sbt "runMain com.jcreixell.finaglehttp2.Client"

To test it, you can use netcat. Before running the client:

nc -l -p 8080

You should see the upgrade headers:

upgrade: h2c
HTTP2-Settings: AAEAABAAAAIAAAABAAN_____AAQAAP__AAUAAEAAAAYAACAA
connection: HTTP2-Settings,upgrade

Benchmarking

For benchmarking, you can use h2load (part of nghttp2):

For HTTP/1.1:

h2load --h1 -n100000 -c100 -m10 http://localhost:8080

For HTTP/2:

h2load -n100000 -c100 -m10 http://localhost:8080

Releases

No releases published

Packages

No packages published

Languages