On Jun 28, 11:28 am, Domenic Denicola <[email protected]>
wrote:
> My initial thought was to do `req.pause()` before the async authorization,
> then `req.resume()` in the callback. But this breaks because `req.pause` is
> useless [1]. It is also a bad idea because, from what I understand, it
> sends some TCP-level pause signal, creating unnecessary roundtrips.

Your reference for calling req.pause() "useless" is a set of mailing
list posts from early last year and things have improved at least
somewhat since then. Since node 0.7.x (specifically [1]), there
shouldn't be any 'data' events emitted after you call req.pause() for
HTTP requests, not until you call req.resume(). From what I gather
there is still an open issue with piping though.

Regarding the sending of TCP NAKs, etc., at this point I think you
shouldn't be worrying about this behavior until you've verified in
production that it is a real limiting factor for your application.

[1] 
https://github.com/joyent/node/commit/e6b6075024e9f1330575b10d7e6552e1ea6dad56

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to