tls: group chunks into TLS segments
TLSWrap::DoWrite() now concatenates data chunks and makes a single call to SSL_write(). Grouping data into a single segment: - reduces network overhead: by factors of even 2 or 3 in usages like `http2` or `form-data` - improves security: segment lengths can reveal lots of info, i.e. with `form-data`, how many fields are sent and the approximate length of every individual field and its headers - reduces encryption overhead: a quick benchmark showed a ~30% CPU time decrease for an extreme case, see https://github.com/nodejs/node/issues/27573#issuecomment-493787867 Fixes: https://github.com/nodejs/node/issues/27573 Backport-PR-URL: https://github.com/nodejs/node/pull/28904 PR-URL: https://github.com/nodejs/node/pull/27861 Reviewed-By:Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
parent
f78ecc3f
Please register or sign in to comment