Skip to content
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

Replace underlying Fetch API implementation #20

Closed
stefan-guggisberg opened this issue Mar 10, 2020 · 3 comments · Fixed by #116
Closed

Replace underlying Fetch API implementation #20

stefan-guggisberg opened this issue Mar 10, 2020 · 3 comments · Fixed by #116
Assignees
Labels
enhancement New feature or request released

Comments

@stefan-guggisberg
Copy link
Contributor

stefan-guggisberg commented Mar 10, 2020

Is your feature request related to a problem? Please describe.
fetch-h2, the current underlying Fetch API implementation, has a serious scalability bottleneck: Parallel requests to the same HTTP/2 origin are effectively serialised, thus defeating the purpose of HTTP/2 Multiplexing. See #14.

Describe the solution you'd like
A. Replacing fetch-h2 with another Fetch API implementation which transparently supports HTTP/1(.1) and HTTP/2 and which provides better scalability for parallel requests. node-fetch-h2 seems to be a good candidate.

B. Alternatively, implement the relevant parts of the Fetch API and write a simple abstraction of the builtin http, https and http2 modules tailored to our needs.

Describe alternatives you've considered
I've created a fetch-h2 issue and looked into creating a PR. The code however is hardly documented and the flow hard to follow. The maintainer doesn't seem to be very responsive either.

@stefan-guggisberg stefan-guggisberg added the enhancement New feature or request label Mar 10, 2020
@stefan-guggisberg stefan-guggisberg self-assigned this Mar 10, 2020
@stefan-guggisberg
Copy link
Contributor Author

stefan-guggisberg commented Mar 17, 2020

Update: The underlying fetch-h2 performance issue has been fixed in the meantime.

However, I still think it's worthwhile writing our own Fetch API implementation on top of our own http, https and http2 abstraction in order to reduce our dependency on projects that aren't frequently updated/actively maintained.

stefan-guggisberg added a commit that referenced this issue Dec 20, 2020
The underlying Fetch implementation is rewritten from scratch, due to serious issues and lack of
support of the previously used implementation (fetch-h2).

BREAKING CHANGE: The exposed API, options etc have been aligned with node-fetch. Due to the major
changes there are numerous breaking changes both in the API and the options.

fixes #20, #27, #32, #81
stefan-guggisberg added a commit that referenced this issue Jan 25, 2021
* feat: rewrite from scratch

The underlying Fetch implementation is rewritten from scratch, due to serious issues and lack of
support of the previously used implementation (fetch-h2).

**BREAKING CHANGE:** The exposed API, options etc have been aligned with node-fetch. Due to the major
changes there are numerous breaking changes both in the API and the options. See the [1.x to 2.x Upgrade Guide](v2-UPGRADE-GUIDE.md) for details.

fixes #20, #27, #32, #81
@tripodsan
Copy link
Contributor

tripodsan commented Jan 25, 2021

hurrah!

github-actions bot pushed a commit that referenced this issue Jan 25, 2021
# [2.0.0](v1.9.2...v2.0.0) (2021-01-25)

### Features

* rewrite from scratch [BREAKING CHANGES] ([#116](#116)) ([75cbcbe](75cbcbe)), closes [#20](#20) [#27](#27) [#32](#32) [#81](#81)

### BREAKING CHANGES

* ** The exposed API, options etc have been aligned with node-fetch. Due to the major
changes there are numerous breaking changes both in the API and the options. See the [1.x to 2.x Upgrade Guide](v2-UPGRADE-GUIDE.md) for details.
@github-actions
Copy link

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants