News for hackers. Stuff that matters.
Re:A HTTP Proxy Server in 20 Lines of node.js Code by fizx on Wednesday April 28, 2010 @12:55PM (#1302007)
I benchmarked this a few weeks ago at around ~300req/s on my recent macbook, which was a little disappointing.

For kicks, here's my CoffeeScript/Node.js code I used. I did the benchmark with ab entirely on localhost. Normally that's not ideal, but it was enough to tell that this isn't as fast as I'd like.

http://gist.github.com/382372

Re:A HTTP Proxy Server in 20 Lines of node.js Code by felixge on Wednesday April 28, 2010 @04:26PM (#1302598)
You need to create a new client for each incoming request. In your code, you are actually queuing up all responses.

So your result is probably an order of magnitude off.

Re:A HTTP Proxy Server in 20 Lines of node.js Code by fizx on Wednesday April 28, 2010 @04:40PM (#1302657)
Good to know, thanks!

Edit: I feel like I tried that, and a couple other variations, and this was the fastest. But it's worth revisiting, and I'll definitely try it again.

Re:A HTTP Proxy Server in 20 Lines of node.js Code by fizx on Wednesday May 05, 2010 @04:49PM (#1322528)
For posterity, after re-benchmarking, 1200-1300 req/s.