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

🚧 [Do not merge] Add support for HTTP2 #167

Closed
wants to merge 94 commits into from

Conversation

abovedave
Copy link
Contributor

@abovedave abovedave commented May 11, 2017

This should give a huge performance boost to DADI Web! Would be nice to profile some builds before and after.

Closes #155.
Closes #174.
Closes #175.
Closes #158.
Closes #168.
Closes #173.

Features

  • Support for HTTP/2 #155 HTTP2 support over SSL when config.server.http2 is true (and config.server.protocol is https) 1
  • Support for HTTP/2 #155 Introduction of config.globalPushManifest and page.pushManifest for pushing assets over HTTP2
  • Rolled our own internal middleware (see /lib/view/public.js 3) for serving from the public folder - removed need for Express modules serve-static and serve-favicon.
  • Changed & deprecated config.headers.useGzipCompression to config.headers.useCompression
  • Added an internal helper called help.canCompress which determines if caching is enabled on the system and tests if the client can accept a compressed output
  • Implement more efficient compression engine (brotli, by way of iltorb, fallbacks to Node's zlib for gzip if not available)
  • For clarify, moved the helpers previously name sendBackJSON, sendBackHTML into view/send.js
  • Removed the unused helper sendBackJSONP
  • Added new compression engine to the response, removing need for Express's Compress middleware
  • Static assets obey compression settings via config.headers.useCompression2
  • Compressed responses are now cached, rather than being cached on each request
  • Assets that have been compressed are cached, rather than being compressed on each request
  • Public folder assets are only compressed if it will save space (checked using compressible)
  • Removed outdated media path.
  • Includes changes made by Process routes after middleware #168

To-do


  1. Node supports H2 natively (scheduled for Node 8, discussion here)
    2. I think we should roadmap changing this to useCompression as we’re detecting and using Brotli where available Done

@abovedave abovedave added this to the 3.0.0 milestone May 11, 2017
@abovedave
Copy link
Contributor Author

Closed until Node supports http2 natively.

@abovedave abovedave closed this Aug 8, 2017
This was referenced Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants