Tuesday, April 23, 2024
HomeGolangOught to x/internet/http2 mix the header and physique packets into one? -...

Ought to x/internet/http2 mix the header and physique packets into one? – Technical Dialogue


When sending numerous small requests, there will likely be a efficiency loss right here.
So ought to mix the header and physique packets, and don’t flush instantly after write headers?

I’m utterly unenlightened in the case of HTTP2 internals, however from skimming the Net, I get the impression that HTTP2 all the time separates HEADERS frames from DATA frames, in all probability for higher multiplexing capabilities.

RFC 7540 – Hypertext Switch Protocol Model 2 (HTTP/2):

The fundamental protocol unit in HTTP/2 is a body (Part 4.1). Every body kind serves a distinct goal. For instance, HEADERS and DATA frames type the idea of HTTP requests and responses (Part 8.1)

HTTP/2 and The way it Works. TLS helps enhance safety. Now it’s… | by Carson | Medium

Introduction to HTTP/2

1 Like

@christophberger Thanks!
I believe it won’t be for multiplexing.

Right here it’s mentioned that multiplexing is applied by means of stream. Every HTTP request/response is related to its personal stream, impartial of one another.

https://httpwg.org/specs/rfc7540.html#Overview

The unique textual content is as follows:

Multiplexing of requests is achieved by having every HTTP request/response trade related to its personal stream (Part 5). Streams are largely impartial of one another, so a blocked or stalled request or response doesn’t stop progress on different streams.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments