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

Add HTTP/2 support to server [$100] #4319

Closed
marxo opened this Issue May 3, 2015 · 20 comments

Comments

Projects
None yet
@marxo

marxo commented May 3, 2015

_2 Upvotes_ HTTP/2 protocol is coming, and serving HTTP/2 with a Meteor app would be awesome.

There's a Node.js implementation for h-16 draft: https://github.com/molnarg/node-http2

Giving the user the ability to use HTTP/2 would immensely speed up applications, allow the requests to be reused better and lessen the need for sharding.

Bountysource

@ekatek

This comment has been minimized.

Show comment
Hide comment
@ekatek

ekatek May 5, 2015

Contributor

Good call, and thank you for the feature request! We welcome discussions about how to make Meteor better. If you haven't yet, check out our wiki page about feature requests on GitHub.

Contributor

ekatek commented May 5, 2015

Good call, and thank you for the feature request! We welcome discussions about how to make Meteor better. If you haven't yet, check out our wiki page about feature requests on GitHub.

@marxo

This comment has been minimized.

Show comment
Hide comment
@marxo

marxo May 20, 2015

The Graduate has added a bounty of $100 to this issue.

marxo commented May 20, 2015

The Graduate has added a bounty of $100 to this issue.

@marxo marxo changed the title from Add HTTP/2 support to server to Add HTTP/2 support to server [$100] May 20, 2015

@dandv

This comment has been minimized.

Show comment
Hide comment
@dandv

dandv Jun 19, 2015

Contributor

One HTTP/1.x anti-pattern that HTTP/2 solves is concatenation (more in this presentation). Meteor could consider a mechanism to skip concatenation and only minify resources.

The talk only mentions the problem of cache invalidation when only one byte in the whole concatenated app.js/css changes and triggers fetching the entire resource. Does HCP optimize this already?

Contributor

dandv commented Jun 19, 2015

One HTTP/1.x anti-pattern that HTTP/2 solves is concatenation (more in this presentation). Meteor could consider a mechanism to skip concatenation and only minify resources.

The talk only mentions the problem of cache invalidation when only one byte in the whole concatenated app.js/css changes and triggers fetching the entire resource. Does HCP optimize this already?

@PEM--

This comment has been minimized.

Show comment
Hide comment
@PEM--

PEM-- Jun 25, 2015

👍 Strategic feature request.

PEM-- commented Jun 25, 2015

👍 Strategic feature request.

@danlg

This comment has been minimized.

Show comment
Hide comment
@danlg

danlg Jun 30, 2015

I vote in favor of HTTP/2 in meteor

danlg commented Jun 30, 2015

I vote in favor of HTTP/2 in meteor

@ChrisCinelli

This comment has been minimized.

Show comment
Hide comment
@ChrisCinelli

ChrisCinelli Jul 24, 2015

HTTP/2 as been out for a while. Back in February, Firefox was getting more transactions though HTTP/2 than through SPDY. At the end of May 45% of the connections in Chrome were made through HTTP/2.

The current way to add HTTPS in general to Meteor is by adding a reverse proxy in front of Meteor. Since nginx's support for HTTP/2 targets the end of 2015, you may want to use nghttp2 or in case you are looking for the edge you may try H2O.
The https://atmospherejs.com/meteor/force-ssl package will make the rest.

However I do agree that it would be nice to have a "native" support for HTTP/2 or at least throught a package.

The node-HTTP2 module mentioned above has some performance issues but https://github.com/indutny/node-spdy is awesome and currently support HTTP/2.

I wonder how easy would be to expose a hook to use your own server module instead of just supporting the native node.js http.

ChrisCinelli commented Jul 24, 2015

HTTP/2 as been out for a while. Back in February, Firefox was getting more transactions though HTTP/2 than through SPDY. At the end of May 45% of the connections in Chrome were made through HTTP/2.

The current way to add HTTPS in general to Meteor is by adding a reverse proxy in front of Meteor. Since nginx's support for HTTP/2 targets the end of 2015, you may want to use nghttp2 or in case you are looking for the edge you may try H2O.
The https://atmospherejs.com/meteor/force-ssl package will make the rest.

However I do agree that it would be nice to have a "native" support for HTTP/2 or at least throught a package.

The node-HTTP2 module mentioned above has some performance issues but https://github.com/indutny/node-spdy is awesome and currently support HTTP/2.

I wonder how easy would be to expose a hook to use your own server module instead of just supporting the native node.js http.

@thatjuan

This comment has been minimized.

Show comment
Hide comment
@thatjuan

thatjuan Oct 18, 2015

Does nginx allow proxying http/2 connections to http/1 targets? And, would doing that not defeat the purpose of http/2?

Also, this video is an excellent primer on http/2 https://www.youtube.com/watch?v=yURLTwZ3ehk

thatjuan commented Oct 18, 2015

Does nginx allow proxying http/2 connections to http/1 targets? And, would doing that not defeat the purpose of http/2?

Also, this video is an excellent primer on http/2 https://www.youtube.com/watch?v=yURLTwZ3ehk

@dandv

This comment has been minimized.

Show comment
Hide comment
@dandv

dandv May 31, 2016

Contributor

A year later, it would be really great to consider prioritizing native HTTP/2 + Server Push support.

This Google I/O 2016 talk showcases some important advantages of using HTTP/2 with server push:

  • Resource bundling no longer necessary.
  • Resources can be named individually, which means the browser can cache them.
  • Hot Code Push can be much faster - only the changed resources will be sent.
  • On the first visit, only the required resources need to be sent to the client. This solves Incremental loading, one of the top requested features in the Meteor roadmap.

Combined with Service Worker support, this would enable the so-called PRPL Pattern (push, render, pre-cache, lazy load) and modern Progressive Web Apps:

  • Push components for the initial route image
  • Render the initial route ASAP
    image
  • Pre-cache components for the remaining routes
  • Lazy-load and create the next routes on-demand

The Polymer Shop demo app shows an impressive first page load time: 300ms.

This will require some significant changes to the Meteor internals, but this is the direction the web is moving towards.

image

Contributor

dandv commented May 31, 2016

A year later, it would be really great to consider prioritizing native HTTP/2 + Server Push support.

This Google I/O 2016 talk showcases some important advantages of using HTTP/2 with server push:

  • Resource bundling no longer necessary.
  • Resources can be named individually, which means the browser can cache them.
  • Hot Code Push can be much faster - only the changed resources will be sent.
  • On the first visit, only the required resources need to be sent to the client. This solves Incremental loading, one of the top requested features in the Meteor roadmap.

Combined with Service Worker support, this would enable the so-called PRPL Pattern (push, render, pre-cache, lazy load) and modern Progressive Web Apps:

  • Push components for the initial route image
  • Render the initial route ASAP
    image
  • Pre-cache components for the remaining routes
  • Lazy-load and create the next routes on-demand

The Polymer Shop demo app shows an impressive first page load time: 300ms.

This will require some significant changes to the Meteor internals, but this is the direction the web is moving towards.

image

@NitroBAY

This comment has been minimized.

Show comment
Hide comment
@NitroBAY

NitroBAY Jun 12, 2016

+1 for http/2 ... I hope it's the main priority (with service workers) 👍

NitroBAY commented Jun 12, 2016

+1 for http/2 ... I hope it's the main priority (with service workers) 👍

@nick-gudumac

This comment has been minimized.

Show comment
Hide comment
@nick-gudumac

nick-gudumac Aug 29, 2016

Contributor

+1

Contributor

nick-gudumac commented Aug 29, 2016

+1

@aliogaili

This comment has been minimized.

Show comment
Hide comment
@aliogaili

aliogaili commented Sep 5, 2016

+1

@HintikkaKimmo

This comment has been minimized.

Show comment
Hide comment
@HintikkaKimmo

HintikkaKimmo commented Sep 8, 2016

+1

@Ajedi32

This comment has been minimized.

Show comment
Hide comment
@Ajedi32

Ajedi32 Sep 8, 2016

Guys, please stop with the +1s. They're basically just noise and contribute nothing to the conversation.

If you want to show your support for this issue, click the thumbs up button on the original post above, or contibute to the bounty.

If you want to subscribe to this issue, there's a button for that over on the right.

Ajedi32 commented Sep 8, 2016

Guys, please stop with the +1s. They're basically just noise and contribute nothing to the conversation.

If you want to show your support for this issue, click the thumbs up button on the original post above, or contibute to the bounty.

If you want to subscribe to this issue, there's a button for that over on the right.

@HintikkaKimmo

This comment has been minimized.

Show comment
Hide comment
@HintikkaKimmo

HintikkaKimmo Sep 8, 2016

Fair enough @Ajedi32 . Its just a feature I would like to see but have no idea how to implement in general level.
I have managed to use CloudFlare to serve Meteor app with HTTP2. Why CloudFlare worked where other CDN's did not, was that you get few things.
SLL for free, WebSocket support (In Meteor contexts this is like super fast private TSL/SSL connection for DDR updates) . This did not, however, manage cache my full application for reasons I am not completely sure at this stage...
With Railgun installation solution serves the whole app with HTTP2 maybe. I have not tried that as Railgun only comes with the 200$ month CloudFlare business package. Might do so in the future and in that case will definitely make a blog post how to set this up.

I used these articles for help. Josh Owens meteor app in production , Modulus CloudFlare with Meteor Configuring XHR Polling

On the bounty side if I ever need this in Prod I am sure to contribute

HintikkaKimmo commented Sep 8, 2016

Fair enough @Ajedi32 . Its just a feature I would like to see but have no idea how to implement in general level.
I have managed to use CloudFlare to serve Meteor app with HTTP2. Why CloudFlare worked where other CDN's did not, was that you get few things.
SLL for free, WebSocket support (In Meteor contexts this is like super fast private TSL/SSL connection for DDR updates) . This did not, however, manage cache my full application for reasons I am not completely sure at this stage...
With Railgun installation solution serves the whole app with HTTP2 maybe. I have not tried that as Railgun only comes with the 200$ month CloudFlare business package. Might do so in the future and in that case will definitely make a blog post how to set this up.

I used these articles for help. Josh Owens meteor app in production , Modulus CloudFlare with Meteor Configuring XHR Polling

On the bounty side if I ever need this in Prod I am sure to contribute

@mitar

This comment has been minimized.

Show comment
Hide comment
@mitar

mitar Feb 14, 2017

Collaborator

BTW, this is the second most upvoted issue for Meteor.

Collaborator

mitar commented Feb 14, 2017

BTW, this is the second most upvoted issue for Meteor.

@jykae

This comment has been minimized.

Show comment
Hide comment
@jykae

jykae Feb 14, 2017

I am a bit interested on this one, checked last Sunday the spots in code that would need a change, and I think it might not be that hard like @ChrisCinelli mentioned.

I wonder how easy would be to expose a hook to use your own server module instead of just supporting the native node.js http.

Would be nice to make contribution for Meteor, as I would now have some time to do it.

jykae commented Feb 14, 2017

I am a bit interested on this one, checked last Sunday the spots in code that would need a change, and I think it might not be that hard like @ChrisCinelli mentioned.

I wonder how easy would be to expose a hook to use your own server module instead of just supporting the native node.js http.

Would be nice to make contribution for Meteor, as I would now have some time to do it.

@mitar

This comment has been minimized.

Show comment
Hide comment
@mitar

mitar Feb 14, 2017

Collaborator

Maybe "a hook" could be socket support: #7392

Collaborator

mitar commented Feb 14, 2017

Maybe "a hook" could be socket support: #7392

@jykae

This comment has been minimized.

Show comment
Hide comment
@jykae

jykae Feb 15, 2017

@mitar yep, hmh, that's probably nicer issue to start understanding platform better for contributions. I take a look at "pull-requests-encouraged" labelled stuff :)

jykae commented Feb 15, 2017

@mitar yep, hmh, that's probably nicer issue to start understanding platform better for contributions. I take a look at "pull-requests-encouraged" labelled stuff :)

@msavin msavin referenced this issue Feb 15, 2017

Merged

Release 1.5 #8327

@krishaamer

This comment has been minimized.

Show comment
Hide comment
@krishaamer

krishaamer Apr 5, 2017

Wow @dandv, Meteor has always been on the bleeding edge of web tech. I hope DMG can keep up and make this a reality!

krishaamer commented Apr 5, 2017

Wow @dandv, Meteor has always been on the bleeding edge of web tech. I hope DMG can keep up and make this a reality!

@hwillson

This comment has been minimized.

Show comment
Hide comment
@hwillson

hwillson Jun 7, 2017

Member

To help provide a more clear separation between feature requests and bugs, and to help clean up the feature request backlog, Meteor feature requests are now being managed under the https://github.com/meteor/meteor-feature-requests repository.

Migrated to meteor/meteor-feature-requests#42.

Member

hwillson commented Jun 7, 2017

To help provide a more clear separation between feature requests and bugs, and to help clean up the feature request backlog, Meteor feature requests are now being managed under the https://github.com/meteor/meteor-feature-requests repository.

Migrated to meteor/meteor-feature-requests#42.

@hwillson hwillson closed this Jun 7, 2017

@meteor meteor locked and limited conversation to collaborators Jun 8, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.