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

Enable HTTP/2 default #2

Closed
3 of 5 tasks
lukeed opened this issue May 13, 2018 · 2 comments
Closed
3 of 5 tasks

Enable HTTP/2 default #2

lukeed opened this issue May 13, 2018 · 2 comments
Labels

Comments

@lukeed
Copy link
Owner

lukeed commented May 13, 2018

Initially, sirv was meant to be a HTTP/2 server from the start, but there were some issues in setting this up. I think a lot of it may have to do with my incomplete knowledge of the H2 protocol, but in the early versions, I was seeing zero performance gain and, in some cases, saw worse performance. This is why I tabled it & sirv is now a(nother) HTTP/1 module.

This is relatively high priority. Because it requires Node 8 for the http2 module, this will also be a breaking change.

My plan of attack is to get sirv (as http) stable on 1.0 first. The http2 version can be made available on the next branch & npm tag until it's ready to become 2.0. At that point, I'll feel confident (enough) that it's done correctly this time around. 😅


Revisit 3849356 and ed6cf05 for initial attempt.


Module:

- [ ] Use createServer within sirv directly (again: 87b2d6d)
- [ ] Expect Buffer values for key & cert

  • Lookup pushable assets from manifest via pathname

CLI Flags:

  • --key, Path to SSL certificate key (Required)
  • --cert, Path to SSL certificate file (Required)
  • --cacert, Path to SSL certificate authority (Optional)
  • -M --manifest, Path to HTTP/2 push manifest file
@lukeed
Copy link
Owner Author

lukeed commented Sep 28, 2019

(Mostly) Accessible in current @next release.
Preparing for 1.0 release soon.

This is done via sirv-cli only, which means that sirv still returns a middleware function.
This is made possible by Node.js directly – it ships a HTTP/2 Compatibility API, which means that the middleware signature is fine as is.

You pass file paths to the --key, --cert, and --cacert flags and they're handled accordingly to set up a HTTP/2 secure server.

Attaching manifest support (via route-manifest) is still on the agenda.

@lukeed
Copy link
Owner Author

lukeed commented Jun 10, 2020

Closed via #64

@lukeed lukeed closed this as completed Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant