Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

http request not respecting backpressure #4509

jessetane opened this Issue Jan 2, 2013 · 5 comments


None yet
3 participants

A bit contrived maybe, but a setup like this should demo the issue:

A > fast connection > B > slow connection > C


A is a big (~300MB) POST request: curl -X POST -d @"/path/to/big.file" localhost:8080
B is a local server: https://gist.github.com/4450228
C is a remote server: https://gist.github.com/4449811

Since A -> B is local, and it's much faster than B -> C, the resulting throughput mismatch seems to cause B to suffer from a memory spike as incoming data buffers up. Calling socket._handle.readStop() at the right moment seemed to help:



bnoordhuis commented Jan 8, 2013

/cc @isaacs

isaacs commented Jan 9, 2013

Interesting. Is this fixed by joyent#4539? It's making the same readStart/readStop change.

@isaacs indeed, thanks :)

@jessetane jessetane closed this Jan 9, 2013

isaacs commented Jan 10, 2013

Fixed on master.

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