-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
doc: add initial version of maintaining-http.md #41798
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
eeb43d8
doc: add initial version of maintaining-http.md
mhdawson 67e0cc5
Apply suggestions from code review
targos 62af82a
Update doc/contributing/maintaining-http.md
mhdawson 5681930
Update doc/contributing/maintaining-http.md
mhdawson 9b057a4
Update doc/contributing/maintaining-http.md
mhdawson 723da3a
Update doc/contributing/maintaining-http.md
mhdawson a93d4a2
Update doc/contributing/maintaining-http.md
mhdawson 95b6dc2
Update doc/contributing/maintaining-http.md
mhdawson 933af04
Update doc/contributing/maintaining-http.md
mhdawson 3974bde
Update doc/contributing/maintaining-http.md
mhdawson 90137ff
Update doc/contributing/maintaining-http.md
mhdawson 50235c8
Update doc/contributing/maintaining-http.md
mhdawson 3fd1dbc
Update doc/contributing/maintaining-http.md
mhdawson 5a1cbcf
Update doc/contributing/maintaining-http.md
mhdawson 277995b
squash: address linter complaint
mhdawson 42823a1
Update doc/contributing/maintaining-http.md
mhdawson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| # Maintaining HTTP | ||
|
|
||
| Support for HTTP is a key priority in terms of ensuring the continued success of | ||
| Node.js as captured in the project's | ||
| [technical priorities](https://github.com/nodejs/node/blob/master/doc/contributing/technical-priorities.md). | ||
|
|
||
| The current high level strategy is based on the discussion in the | ||
| [Next-10](https://github.com/nodejs/next-10) | ||
| [mini-summit](https://github.com/nodejs/next-10/blob/main/meetings/summit-jan-2022.md) | ||
| on modern HTTP which was held on Jan 27 2022. | ||
|
|
||
| ## High level strategy | ||
|
|
||
| The key elements of our strategy for future HTTP APIs are: | ||
|
|
||
| * APIs should be HTTP protocol independent (support HTTP1, HTTP2, etc.) | ||
| * APIs should be transport protocol independent (TCP, QUIC, etc.) | ||
| * APIs should provide good defaults that perform well | ||
| * Client/server APIs should be consistent and allow easy integration | ||
| * Common requirements like piping out from client API to server APIs should be easy | ||
| * For both the Client and Server there is a need for multiple APIs, with each targeting | ||
| a different level of abstraction. | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Unfortunately our existing HTTP APIs: | ||
|
|
||
| * [HTTP](https://nodejs.org/docs/latest/api/http.html) | ||
| * [HTTPS](https://nodejs.org/docs/latest/api/https.html) | ||
| * [HTTP2](https://nodejs.org/docs/latest/api/http2.html) | ||
|
|
||
| do not align with our high level strategy. While these APIs | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| are widely used and we do not plan to deprecate or remove them, | ||
| they are not the focus of active development or performance improvements. | ||
| Bug fixes however are still important for all of these APIs. | ||
|
|
||
| With respect to the HTTP protocols themselves, our current assessment in | ||
| terms of priority within existing or new APIs is: | ||
| * HTTP 2 is in “maintenance mode” for both protocol and APIs | ||
| * HTTP 1 is a stable protocol, but innovation is still possible with the APIs | ||
| * HTTP 3 is the future need to plan in support | ||
|
||
|
|
||
| The current strategy is to build out 2 new client APIs and 2 new Server APIs | ||
| in line with the key elements above. | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| While transport-level APIs are important (e.g. socket level), the HTTP APIs | ||
| should not be tied to a specific transport-level API. Therefore, | ||
| transport-level APIs are out of the scope of our HTTP strategy/maintenance | ||
| information. | ||
|
|
||
| ### Client APIs | ||
|
|
||
| For client APIs we want a high-level API and a low-level API when | ||
| more control is required. The current plan is for the following APIs: | ||
|
|
||
| * High-level API - | ||
| [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | ||
| based API built on top of [undici](https://www.npmjs.com/package/undici). | ||
| * Low-level API - a subset of the APIs exposed by | ||
| [undici](https://www.npmjs.com/package/undici). The exact shape and | ||
| set of these APIs is still to be worked out. The current plan is to | ||
| pull undici into Node.js core without exposing its APIs in the Node.js | ||
| API so that it can initially be used to support the higher level | ||
| Fetch-based API. As this gets worked out we will discuss which | ||
| APIs to expose in the Node.js API surface. | ||
|
|
||
| ### Server APIs | ||
|
|
||
| For the server APIs we do not yet have a clear path, other than wanting | ||
| to align them with the APIs built for the client. | ||
|
|
||
| ## Maintaining the HTTP APIs | ||
|
|
||
| ### HTTP, HTTPS | ||
|
|
||
| The low-level implementation of the | ||
| [HTTP](https://nodejs.org/docs/latest/api/http.html) | ||
| and [HTTPS](https://nodejs.org/docs/latest/api/https.html) APIs | ||
| are maintained in the [llttp](https://github.com/nodejs/llhttp) | ||
| repository. Updates are pulled into Node.js under | ||
| [deps/llhttp](https://github.com/nodejs/node/tree/master/deps/llhttp) | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The low-level implementation is made available in the Node.js API through | ||
| JavaScript code in the [lib](https://github.com/nodejs/node/tree/master/lib) | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| directory and C++ code in the | ||
| [src](https://github.com/nodejs/node/tree/master/src) directory. | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### HTTP2 | ||
|
|
||
| The low-level implementation of | ||
| [HTTP2](https://nodejs.org/docs/latest/api/http2.html) | ||
| is based on [nghttp2](https://nghttp2.org/). Updates are pulled into Node.js | ||
| under [deps/nghttp2](https://github.com/nodejs/node/tree/master/deps/nghttp2) | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| as needed. | ||
|
|
||
| The low-level implementation is made available in the Node.js API through | ||
| JavaScript code in the [lib](https://github.com/nodejs/node/tree/master/lib) | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| directory and C++ code in the | ||
| [src](https://github.com/nodejs/node/tree/master/src) directory. | ||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
mhdawson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.