What is the optimal chunk size to send over http?

Viewed 2096

I have to send data over http, server to server, with this basic kind of code :

const http = require('http')
const someBigData = require('./bigDataSource')

http.createServer((req, res) => {
  res.write(someBigData)
  res.end()
}).listen(8080)

The thing is, someBigData can be VERY big. So my question is, what is the optimal size for a chunk ?

0 Answers
Related