Skip to content

Commit

Permalink
docs: add notes about pipelining
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Sep 6, 2020
1 parent 364c5ee commit 3513958
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ The benchmark is a simple `hello world` [example](benchmarks/index.js) without p
<a name='client'></a>
### `new undici.Client(url, opts)`

A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection.
A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled
by default.

`url` can be a string or a [`URL`](https://nodejs.org/api/url.html#url_class_url) object.
It should only include the protocol, hostname, and the port.
Expand Down Expand Up @@ -71,6 +72,10 @@ Options:
- `pipelining: Number`, the amount of concurrent requests to be sent over the
single TCP/TLS connection according to
[RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2).
Carefully consider your workload and environment before enabling concurrent requests
as pipelining may instead significantly reduce performance if used incorrectly.
Pipelining is sensitive to network stack settings as well as head of line blocking
caused by long running requests.
Default: `1`.

- `tls: Object|Null`, an options object which in the case of `https` will be passed to
Expand Down

0 comments on commit 3513958

Please # to comment.