How large are Node chunks?

Robin Kim
therobinkim
Published in
1 min readAug 7, 2015

Node will receive data in 64 KiB chunks (aka 65536 Bytes)!

var http = require('http');http.createServer(function (request, response) {
request.on('data', function onData(chunk) {
console.log(chunk.length);
});
response.end('you made a ' + request.method + ' request!');
});

The above code will output 65536 several times if a sufficiently large amount of data is sent to the Node server via a POST request.

--

--

Robin Kim
therobinkim

Full stack software engineer. I teach at Hack Reactor Remote @ Galvanize.