On Mon, Apr 09, 2012 at 03:00:56PM -0700, Jimb Esser wrote: > We ran into this same thing, and I ended up just writing a small patch > to the HTTPS agent to hold on to https sockets for 10 seconds after a > request finished. This ended up roughly tripling our SimpleDB > performance (back to Node 0.4 performance levels, which did connection > pooling by default, or at least had an option for it). > > Here's a gist with some code you can run on your HTTPS agent to add > pooling, if forever doesn't work for you (I've never looked into it > myself). https://gist.github.com/2346805 Warning: quite hacky, and > asserts that the underlying node implementation is exactly what it > expects (tested on v0.6.12)
Does it handle weird cases correctly? Like, you send a new request at the same time the server decides to kill the connection because it's idle? requests forever handles all that. > - an actual node patch would probably be > better, but this works for now. It's never going to become a node core feature. You have to resend requests if the server kills the connection without a response just after you sent your request, for example. That's RFC compliant, I think, but it's a high-level abstraction.
pgpXx7cbEXKDG.pgp
Description: PGP signature