-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Future of HTTP Technical Plan #55
Comments
I'll be working up a detailed description over the next few days but the short version of the proposal is this: Due to the organic and incremental way in which HTTP/1.1 and HTTPS support evolved in core, the fundamental differences introduced in HTTP/2, and the desire for us not to break any existing userland code, HTTP/1.1 and HTTP/2 support in core has become less than ideal. There are currently four distinct HTTP server API implementations:
And three distinct client API implementations:
Add to this the fact that the TCP and UDP implementations each have very different implementations, the TCP/TLS implementation has become extremely complicated and difficult to maintain, and the differences between the APIs have been the source of many bugs going back many years. The introduction of QUIC and HTTP/3 yields the prospect of making this problem even more acute. The current model is unsustainable both for core and userland, and makes it difficult to make further progress. The somewhat radical proposal is to completely reimplement the TCP/UDP/HTTP stack from the ground up in Node.js, with the eventual target of replacing the existing http, https, http/2 stacks (as well as the tcp and dgram stacks but that is secondary to this discussion here) with a more architecturally consistent foundation. All of the details of this reimplementation need to be worked out, including determining how much of the existing code can be reused or repurposed. But, the highlevel idea would be to take the lessons learned from implementing both the HTTP/2 and QUIC internals to implement a new common subsystem for all HTTP versions, with a single core JavaScript API upon which a higher level JavaScript API framework can be based. That higher level framework would be implemented as a layer on top, but external to node.js core, potentially vendored in as a dependency but not necessarily so...
Under this plan, the existing This would be a massive effort that would be expected to take quite a long time to complete and there are a ton of details to work through. A key goal on the Node.js core side will be to actually decrease the complexity and obscurity of the existing separate code paths and yield a more maintainable architecture top to bottom. That's the short summary, will work on expanding detail over the next week. |
In the webserver frameworks team call today we discussed distinct work threads on this that can proceed in parallel:
These can largely progress in parallel with each other, we just need owners for each part to help move it forward. |
For number 5, we have a new tracking issue #60 |
Closed in favor of nodejs/http-next#2 |
Follow up issue from OpenJS World collab summit discussion.
This issue will track the work on planning the technical work for the future http modules discussed during our collab summit.
I'll leave it to @jasnell to kick us off 😄
The text was updated successfully, but these errors were encountered: