Description
Hello @nodejs/http2 folks... now that the big destroy/cleanup refactor is finally done, there are a number of remaining items that need working on with an eye towards bringing http2 out of experimental in time for Node.js 10.0.0. We can use this tracking issue to keep organized.
Please leave a comment in the thread if you wish to take on one of the items. I've added a comment on the ones I'm definitely working on.
-
PR: http2: convert Http2Settings to an AsyncWrap #17763 -- Convert
Http2Settings
into an Async handle object following the same pattern asHttp2Ping
(c++ and javascript). Currently, there is no async context tracking between sendingSETTINGS
and receiving the acknowledgement back. What I'd like to do is add a callback argument toHttp2Session.prototype.settings()
and turn thenode::http2::Http2Settings
object into an AsyncWrap following the same patternHttp2Ping
uses. There are a couple of complicating points on this:- A
SETTINGS
frame is sent automatically at the start of theHttp2Session
and there is currently no way to pass a callback in for this. Currently alocalSettings
event is emitted on theHttp2Session
when it receives an acknowledgement, which is the only way we currently have for catching these. If someone wants to set a callback for that initialSETTINGS
frame, then they'll need a way of setting it. - The
localSettings
andremoteSettings
events would need to be refactored.
- A
-
respondWithFile()
andrespondWithFD()
should have an associated request handle and callback. Currently the only way to know when these operations are done is to watch of theclose
event on theHttp2Stream
. (c++ and javascript) -
node::http2::Http2Stream::Provider:FD
currently uses synchronous libuv fs calls to fill in the DATA frame buffer. While these are relatively small reads, it is still blocking file i/o. This bit needs to be refactored to use non-blocking. This will require quite a bit of work and requires quite a bit of C++ know how to get done. (all c++) -
Performance metrics! Each
Http2Session
should record some basic metrics about the number ofHttp2Stream
s that have been used, the average duration, etc. These could also reasonably emit trace events in a number of places along with some perf_hooks integration. I'll be working on this in the coming few weeks. (mostly c++, some js) http2: perf_hooks integration #17906 -
Reviewing test coverage. Pretty self-explanatory.
-
Support
unref()
andref()
inHTTP2Session
andHTTP2Stream
http2: implement ref() and unref() on client sessions #16617 -
Add a
http2.Pool
object to maintain a pool of sessions open, one for every target host. This functionality is needed by everyone that wants to use the client. Requires http2: implement ref() and unref() on client sessions #16617 because the pool should automatically ref() and unref() the sessions based on usage. There is no global pool. (will depend largely on origin set support landing - http2: initial support for originSet #17935) -
Update nghttp2 library dependency (deps: update nghttp2 to 1.29.0 #17908)
-
Support
ALTSVC
frames http2: add altsvc support #17917 -
Initial origin set support http2: initial support for originSet #17935
-
Stretch goal: rudimentary support for extension frames.
I'm currently working on the Http2Settings
and perf metrics items, and will be looking at the extension frames bit later on once everything else is done.