File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,10 +37,12 @@ import { MultipartBody } from '../_shims/MultipartBody';
3737import { type Fetch } from '../core' ;
3838
3939const KEEP_ALIVE_TIMEOUT_MS = 10 * 60 * 1000 ;
40- // Bound the pool to a few TLS sessions per origin and multiplex many H2 streams
41- // over each. 4 x 64 = 256 concurrent requests in flight before undici queues the rest.
42- const H2_MAX_CONNECTIONS = 4 ;
43- const H2_MAX_CONCURRENT_STREAMS = 64 ;
40+ // Bound the pool to several TLS sessions per origin and multiplex H2 streams over
41+ // each. The server typically advertises MAX_CONCURRENT_STREAMS=100-128; we use 128
42+ // per connection to match. 20 x 128 = 2560 concurrent requests in flight before
43+ // undici queues the rest.
44+ const H2_MAX_CONNECTIONS = 20 ;
45+ const H2_MAX_CONCURRENT_STREAMS = 128 ;
4446
4547// One module-scoped default dispatcher, reused across requests: a bounded HTTP/2 pool
4648// with keep-alive. `allowH2` negotiates h2 over TLS via ALPN and transparently falls
You can’t perform that action at this time.
0 commit comments