libp2p/js-libp2p-spdy

go-libp2p-spdy has problems - Can not send objects to go, if they are larger than 64k

Open

#48 建立於 2016年12月23日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)JavaScript (11 fork)github user discovery
bugdifficulty:hardhelp wantedready

倉庫指標

Star
 (10 star)
PR 合併指標
 (PR 指標待抓取)

描述

I've been tracking this issue for some time now, and it looks like this is due to spdystream (go implementation of spdy being used) not support flow control.

But lets start from the beginning.

  1. Sending files from js to go ipfs works fine for files less than 63k, but starts suddenly failing at anything larger.
  2. Looking into the logs, go-ipfs bitswap never receives the block we are sending
  3. Looking into spdy it turns out it never emits the message we sent to the layer above.
  4. It turns out the INITIAL_FLOW_CONTROL_WINDOW_SIZE is set at 64k, which spdy-stream (js impl) follows. But with larger buffers it starts using the flow control features of spdy.
  5. It turns out there is an open issue to support flow control on spdystream, and as it does not implement it is not able to handle the frames spdy-transport is sending. https://github.com/docker/spdystream/issues/2

貢獻者指南