Skip to content

Fix back-pressure issues when cloning responses#142

Closed
ThaNarie wants to merge 1 commit into
node-fetch:masterfrom
ThaNarie:master
Closed

Fix back-pressure issues when cloning responses#142
ThaNarie wants to merge 1 commit into
node-fetch:masterfrom
ThaNarie:master

Conversation

@ThaNarie
Copy link
Copy Markdown

@ThaNarie ThaNarie commented Aug 3, 2016

Add tests showing that cloned responses will cause back-pressure

When forking streams, if one of the streams doesn't read, and its
internal buffer is full, it will stop all streams to pause.

The added tests will now fail because of the 2 second timeout, but
without the timeout they will pause indefinitely.
They are copies of the test above them, but with a larger response.

re #139

(Note: this are only the tests, not the actual fixes)

@bitinn
Copy link
Copy Markdown
Collaborator

bitinn commented Aug 3, 2016

I will take some times to think about how to solve it, probably with a slightly more clever PassThrough stream (one that simply drain itself when there is no downstream pipes)...

When forking streams, if one of the streams doesn't read, and its
internal buffer is full, it will stop all streams to pause.

The added tests will now fail because of the 2 second timeout, but
without the timeout they will pause indefinitely.

re node-fetch#139
@bitinn
Copy link
Copy Markdown
Collaborator

bitinn commented Sep 11, 2016

Since there isn't a good solution to this problem, we decide to put it in the KNOWN LIMIT document.

See also #151 on discussion about buffer size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants