You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing two HTTP1 requests the HTTP request reuses the keep-alive connection. This is more efficient as it avoids the overhead of creating two connections.
However when using HTTP2 a new connection is always created. This has a performance impact when doing many requests.
Describe the feature
Somehow reuse connections when making two http2 requests to the same host within a timeframe.
importgotfrom'got';(async()=>{try{// first requestconstresponse1=awaitgot('https://www.google.com',{http2: true});console.log('response 1:',response1.statusCode);// second requestconstresponse2=awaitgot('https://www.google.com/search?q=hello',{http2: true});console.log('response 2:',response2.statusCode);}catch(err){console.error('error:',err);}})();
By looking in wireshark I can see this opens two separate tcp connections
Checklist
I have read the documentation and made sure this feature doesn't already exist.
The text was updated successfully, but these errors were encountered:
What problem are you trying to solve?
When doing two HTTP1 requests the HTTP request reuses the keep-alive connection. This is more efficient as it avoids the overhead of creating two connections.
However when using HTTP2 a new connection is always created. This has a performance impact when doing many requests.
Describe the feature
Somehow reuse connections when making two http2 requests to the same host within a timeframe.
By looking in wireshark I can see this opens two separate tcp connections
Checklist
The text was updated successfully, but these errors were encountered: