feat: add IP prioritization hints for HTTP/1.1 and HTTP/2#4831
feat: add IP prioritization hints for HTTP/1.1 and HTTP/2#4831amyssnippet wants to merge 1 commit intonodejs:mainfrom
Conversation
|
@ronag , after the merge of the nodejs/node#61503 , i saw this reference and i thought to contribute here too. |
|
Is not the same API as the one added in the upstream PR |
Uzlopak
left a comment
There was a problem hiding this comment.
hints is imho a too generic term. We should need a more specific term.
If I understand you correctly you want to pass the value down as typeOfService
So i guess hints has to be renamed to typeOfService and setPriority to setTypeOfService ?
Also typeOfService has to be a number between 0 and 255?
I
i renamed all of them |
This relates to...
IP Prioritization support for HTTP/1.1 and HTTP/2 requests.
Rationale
This PR introduces the ability to set IP-level prioritization hints for requests. This is particularly useful for applications running in environments that utilize Quality of Service (QoS) markings or differentiated services (DiffServ) at the network layer, allowing for fine-grained control over packet priority directly from the HTTP client.
Changes
hintsoption (validated as a number).hintsvalue to the socket usingsocket.setPriority()if available.hintsare passed through buildConnector tonet.connectoptions.hintsoption.socket.setPriorityis called with the correct value for HTTP/1.1.hintsare correctly passed to the connection options (net.connect) for HTTP/2.Features
hintsin DispatchOptions to set IP prioritization.socket.setPriority) and HTTP/2 (per-connection via connect options).Bug Fixes
N/A
Breaking Changes and Deprecations
N/A
Status