Skip to content

Standalone code that reproduces a racing such thet hyper is stuck with open network communications.

License

Notifications You must be signed in to change notification settings

izderadicka/hyper-stuck

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo to reproduce the stalling of Hyper Client

Layout of the repo

  • ./cmd/h2srv => Go Http Server

  • ./cmd/h2go => Go Http Client

  • ./src/main.rs => Rust Http Client

What happens between client & server

A simple REST API which expects byte buffer in a body and responds back length of the buffer in a json.

Example: Send "hello" and get its length back

$ echo hello | curl -X POST -k --http2 --data-binary @- $HTEST_URL
{"Len":6}

Building

  1. Generate certs first (openssl needed)
cd certs
bash ../gencert.sh
  1. Build server
go build ./cmd/h2srv
  1. Build go client
go build ./cmd/h2go
  1. Build rust client
cargo build --release

Running

  1. Running server
./h2srv
  1. Running Rust Client
source test.env
./target/release/hyper-stuck
  1. Running Go client
export GODEBUG=x509ignoreCN=0
./h2go

Params for the hyper client

The are in the file test.env. They are:

# The URL to connect to
export HTEST_URL=https://127.0.0.1:9001/put

# The number outstanding requests. 1 future => 1 request
export HTEST_FUT_LIMIT=400

# Number of requests to be made
export HTEST_REQ_COUNT=100000

# Size of the buffer sent in each request (below is 256KB)
export HTEST_BUF_SIZE=$((256*1024))

# Number of connections. In hyper, this will create as many hyper::client::Client instances
export HTEST_CONN_COUNT=1

About

Standalone code that reproduces a racing such thet hyper is stuck with open network communications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 76.3%
  • Go 21.2%
  • Shell 2.5%