feat: add IP prioritization hints for HTTP/1.1 and HTTP/2#4831
Open
amyssnippet wants to merge 1 commit intonodejs:mainfrom
Open
feat: add IP prioritization hints for HTTP/1.1 and HTTP/2#4831amyssnippet wants to merge 1 commit intonodejs:mainfrom
amyssnippet wants to merge 1 commit intonodejs:mainfrom
Conversation
Author
|
@ronag , after the merge of the nodejs/node#61503 , i saw this reference and i thought to contribute here too. |
ronag
reviewed
Feb 15, 2026
| } | ||
|
|
||
| if (socket.setPriority) { | ||
| socket.setPriority(request.hints) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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