The coming of HTTP/2

The coming of HTTP/2

by Ken Task -
Number of replies: 5
Picture of Particularly helpful Moodlers

Granted this is not a posting about Moodle hardware/performance specifically but think it's related and, according to those who keep informed on the topic (I've just recently discovered and feel I've had blinders on! :\), it will have an impact on Moodle via the setup of Apache servers.

In investigating HTTP/2 have learned that Google provides something called SPDY that is using HTTP/2 but the IETF HTTP
working group is in final stages ... the draft is in the "Last Call" state.  Translation by layman: Here "soon" means "around a few
weeks".

WordPress folks are talking about it: https://wordpress.org/support/topic/http2-and-wordpress

https://www.google.com/search?q=HTTP%2F2&ie=utf-8&oe=utf-8

Sorry for the prelim, now the questions ....

Anyone running Google's SPDY and Moodle 2 now?

Anyone on the leading edge who will adopt HTTP/2?

Will this development change moodle coding?

For those that remotely host, would think inquiring with hosting provider about HTTP/2 will become a topic soon.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: The coming of HTTP/2

by James McLean -

Once Apache has a working module then people will look at it.

I wouldn't expect much would change at the application level as the standard only controls how the client (browser) talks to the server (apache). Apache will still just serve up what it's been given by PHP.

Moodle already supports 100% SSL usage which HTTP/2 suggests anyway.

In reply to James McLean

Re: The coming of HTTP/2

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks for reply/thoughts ...

This from a comment on:

http://stackoverflow.com/questions/28740791/http2-headers-compatibility-with-older-browsers

"The primary advantage to supporting HTTP/2 directly in PHP would be allowing the resources linked to to be 'pushed' to willing clients who support the feature. Many PHP-based CMS environments would be able to supply a list of stylesheets, scripts and images without having to re-parse output intended for the client."

Server push not a new idea ... started back during the 'world  wide wait'.  Does Moodle use any such PHP feature now to 'push'?

'spirit of sharing', Ken

In reply to Ken Task

Re: The coming of HTTP/2

by Dale Davies -

From what I can tell, it won't change much in terms of how Moodle itself is developed.  Some changes to the themes may be required to take advantage of HTTP2.

I read this article on hacker news earlier today which puts accross an interesting point of view...

https://mattwilcox.net/web-development/http2-for-front-end-web-developers

There is also an interesting discussion on HN...

https://news.ycombinator.com/item?id=9137690

In reply to Ken Task

Re: The coming of HTTP/2

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Ken,

In short, yes - there will be some changes that we can make with mod_spdy available.

I can't remember the full details of all of the changes, but one change would be to disable combo loading.

At the moment, for much of our CSS and JS, we combine multiple files into a single file (this is called combo loading). This is great for reducing the number of trips with HTTP1, but means that sometimes content is less easy to cache. This is because different files will be combined in different orders on different pages. The browser is only aware of the entire combination of pages as a single resource. That is to say that when you request files a, b, and c as a combo-loaded set, you get all three, in that order. The browser knows them as abc. If on another page you get them in a different order, or only get a subset of them (e.g. ab), then your browser doesn't match that set to the one it has in it's cache and goes to fetch ab from the server again.

By switching off this combo loading for spdy connections, we can better cache the content in the browser. The browser will ask for a, b, and c separately and cache them separately. When you go to a different page where only a, and b are used, they can be found in the cache and are served immediately.

With HTTP, combo loading is good because of the cost of round trips, etc. but with the introduction of spdy we can send multiple requests in parallel in a single transaction.

Hope that explains things a little,

Andrew

Average of ratings: Useful (2)