summaryrefslogtreecommitdiff
path: root/ext/fetch/20_headers.js
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-09-20 11:23:58 -0600
committerGitHub <noreply@github.com>2023-09-20 11:23:58 -0600
commit0981aefbdce4c0be961f6447bf68069c518227ef (patch)
tree07c224f3d6a5d6938db326a63197cebf2b7b8c1b /ext/fetch/20_headers.js
parentd77f3fba03abef07bf7aa7b83f86d6e99077f4b4 (diff)
fix(ext/web): Aggregate small packets for Resource implementation of ReadableStream (#20570)
Fixes: #20569 by introducing a custom replacement for the tokio mpsc channel that is byte-size backpressure-aware. Using the testcase in the linked bug, we see all the small writes aggregated into a single packet and HTTP frame. ``` 10:39 $ nc localhost 8000 GET / HTTP/1.1 HTTP/1.1 200 OK content-type: text/plain vary: Accept-Encoding transfer-encoding: chunked date: Tue, 19 Sep 2023 16:39:13 GMT A 0 1 2 3 4 ``` This patch: ``` Running 10s test @ http://localhost:8080/ 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 157.47us 194.89us 9.53ms 98.97% Req/Sec 31.37k 1.56k 34.73k 85.15% 630407 requests in 10.10s, 73.35MB read Requests/sec: 62428.12 Transfer/sec: 7.26MB ``` main: ``` Running 10s test @ http://localhost:8080/ 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 343.75us 200.48us 10.41ms 98.25% Req/Sec 14.64k 806.52 16.98k 84.65% 294018 requests in 10.10s, 39.82MB read Requests/sec: 29109.91 Transfer/sec: 3.94MB ``` --------- Co-authored-by: Bert Belder <bertbelder@gmail.com>
Diffstat (limited to 'ext/fetch/20_headers.js')
0 files changed, 0 insertions, 0 deletions