clickhouse-js icon indicating copy to clipboard operation
clickhouse-js copied to clipboard

Investigate the effect of Nagle's algorithm of the request performance

Open mshustov opened this issue 2 years ago • 0 comments

Nagle's algorithm delays data before it is sent via the network. It attempts to optimize throughput at the expense of latency.

In any non-pipelined stop-and-wait request-response application protocol where request data can be larger than a packet, this can artificially impose a few hundred milliseconds latency between the requester and the responder.

see https://en.wikipedia.org/wiki/Nagle%27s_algorithm

Consider disabling Nagle's algorithm with https://nodejs.org/api/http.html#requestsetnodelaynodelay

mshustov avatar Aug 05 '22 08:08 mshustov