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#4831mcollina merged 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4831 +/- ##
==========================================
- Coverage 93.19% 93.15% -0.04%
==========================================
Files 109 109
Lines 34222 34254 +32
==========================================
+ Hits 31893 31911 +18
- Misses 2329 2343 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
the test failure is flaky, and i have a question, is this pr will be automerged when all ci checks passes? is yes then what about this flaky test? what should i do next, pls guide! |
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