His fastest "node.js+net" case is not optimal. I could easily come up with an even faster implementation by using Buffers instead of strings by not calling setEncoding(), which makes it 30% faster on my machine. This should translate to about 37500 queries/sec on his machine:
var net = require('net');
var server = net.createServer(function (stream) {
stream.on('connect', function () {});
stream.on('data', function (data) {
var l = data.length;
if (l >= 4 && data[l - 4] == 0xd && data [l - 3] == 0xa && data[l - 2] == 0xd && data[l - 1] == 0xa) {
stream.write('HTTP/1.0 200 OK\r\nConnection: Keep-Alive\r\nContent-Type: text/html\r\nContent-Length: 13\r\n\r\nHello World\r\n');
}
});
stream.on('end', function () {stream.end();});
});
server.listen(8124, 'localhost');