[jetty-dev] HTTP/2 Push is not working

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jetty-dev] HTTP/2 Push is not working

Guillaume Drouet
Hi,

I'm using jetty 9.3.0.M2 as an embedded server configured for HTTP/2 (h2-14 on chrome).

I tried to enable server-push with PushCacheFilter and PushSessionCacheFilter but both are not working. When a HTML page refers many JS/CSS files, the filter intercepts the referer header and populate a cache as expected. This is done the first time, and when the page is loaded a second time, the filter push the secondary resources. However, the browser does not seem to be notified: it performs additional requests and secondary resources are loaded only when the HTML is fetched.

Any idea?

Thanks

--
Guillaume DROUET

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] HTTP/2 Push is not working

Simone Bordet-2
Hi,

On Sat, Apr 18, 2015 at 10:39 AM, Guillaume Drouet <[hidden email]> wrote:
> Hi,
>
> I'm using jetty 9.3.0.M2 as an embedded server configured for HTTP/2 (h2-14
> on chrome).
>
> I tried to enable server-push with PushCacheFilter and
> PushSessionCacheFilter but both are not working.

Well, they are working.
They are actually live on https://webtide.com.

> When a HTML page refers
> many JS/CSS files, the filter intercepts the referer header and populate a
> cache as expected. This is done the first time, and when the page is loaded
> a second time, the filter push the secondary resources. However, the browser
> does not seem to be notified: it performs additional requests and secondary
> resources are loaded only when the HTML is fetched.

What browser exact version ?
Do you have browser's logs ? Server logs ?
How do you know the browser is actually making the request (via the
network) rather than just displaying the request into a tool window ?

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] HTTP/2 Push is not working

Guillaume Drouet
Hi,

yes it seems to work on https://webtide.com because I see in chrome that all statics are downloaded at the same time. I'm still surprised that chrome shows that they are required after the HTML page is fetched, but not sure this tool is fully reliable.

My Chrome version is 43.0.2351.3 m

No particular log reports something related to the internal push operations. However, the filter works has expected and calls the push() method for each associated resource.

I make sure the browser makes a new request by putting a breakpoint in the filter. Each time a static is needed, I can see the browser actually makes a new request to the server instead of expecting the promised push.

I tryed with the latest jdk 1.8.0_45 and the corresponding ALPN version, but nothing changed.




2015-04-21 16:08 GMT+02:00 Simone Bordet <[hidden email]>:
Hi,

On Sat, Apr 18, 2015 at 10:39 AM, Guillaume Drouet <[hidden email]> wrote:
> Hi,
>
> I'm using jetty 9.3.0.M2 as an embedded server configured for HTTP/2 (h2-14
> on chrome).
>
> I tried to enable server-push with PushCacheFilter and
> PushSessionCacheFilter but both are not working.

Well, they are working.
They are actually live on https://webtide.com.

> When a HTML page refers
> many JS/CSS files, the filter intercepts the referer header and populate a
> cache as expected. This is done the first time, and when the page is loaded
> a second time, the filter push the secondary resources. However, the browser
> does not seem to be notified: it performs additional requests and secondary
> resources are loaded only when the HTML is fetched.

What browser exact version ?
Do you have browser's logs ? Server logs ?
How do you know the browser is actually making the request (via the
network) rather than just displaying the request into a tool window ?

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Guillaume DROUET

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] HTTP/2 Push is not working

Simone Bordet-2
Hi,

On Tue, Apr 21, 2015 at 5:23 PM, Guillaume Drouet <[hidden email]> wrote:

> Hi,
>
> yes it seems to work on https://webtide.com because I see in chrome that all
> statics are downloaded at the same time. I'm still surprised that chrome
> shows that they are required after the HTML page is fetched, but not sure
> this tool is fully reliable.
>
> My Chrome version is 43.0.2351.3 m
>
> No particular log reports something related to the internal push operations.
> However, the filter works has expected and calls the push() method for each
> associated resource.
>
> I make sure the browser makes a new request by putting a breakpoint in the
> filter. Each time a static is needed, I can see the browser actually makes a
> new request to the server instead of expecting the promised push.

Nah.
It's the internal, server-side only, push mechanism that makes these
request, not the browser.

Please use chrome://net-internals/#spdy to actually see what's going
on at the HTTP/2 level in the browser (click on the right connection
link).
You will see the stream of all HTTP/2 frames.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] HTTP/2 Push is not working

Guillaume Drouet
Ho you're totally right. HTTP/2 server push actualy works. The interesting point is that HTTP/2 is not always faster than a non secured HTTP/1.1 connection. This was curious when I compared response times of both connectors and this is mainly why I was not sure that server-push was working...

Thanks!

2015-04-21 21:33 GMT+02:00 Simone Bordet <[hidden email]>:
Hi,

On Tue, Apr 21, 2015 at 5:23 PM, Guillaume Drouet <[hidden email]> wrote:
> Hi,
>
> yes it seems to work on https://webtide.com because I see in chrome that all
> statics are downloaded at the same time. I'm still surprised that chrome
> shows that they are required after the HTML page is fetched, but not sure
> this tool is fully reliable.
>
> My Chrome version is 43.0.2351.3 m
>
> No particular log reports something related to the internal push operations.
> However, the filter works has expected and calls the push() method for each
> associated resource.
>
> I make sure the browser makes a new request by putting a breakpoint in the
> filter. Each time a static is needed, I can see the browser actually makes a
> new request to the server instead of expecting the promised push.

Nah.
It's the internal, server-side only, push mechanism that makes these
request, not the browser.

Please use chrome://net-internals/#spdy to actually see what's going
on at the HTTP/2 level in the browser (click on the right connection
link).
You will see the stream of all HTTP/2 frames.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Guillaume DROUET

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] HTTP/2 Push is not working

Simone Bordet-2
Hi,

On Tue, Apr 21, 2015 at 11:00 PM, Guillaume Drouet <[hidden email]> wrote:
> Ho you're totally right. HTTP/2 server push actualy works. The interesting
> point is that HTTP/2 is not always faster than a non secured HTTP/1.1
> connection.

We are very interested in these results.
Can you share ?

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] HTTP/2 Push is not working

Guillaume Drouet
Hi,

Sure:
- clone the master branch here: https://github.com/wuic/wuic-samples/tree/master
- jump into "js-css-sample" directory and run "clean package jetty:run-forked"

The HtmlParserFilter is installed and performs server-push.

2015-04-23 13:45 GMT+02:00 Simone Bordet <[hidden email]>:
Hi,

On Tue, Apr 21, 2015 at 11:00 PM, Guillaume Drouet <[hidden email]> wrote:
> Ho you're totally right. HTTP/2 server push actualy works. The interesting
> point is that HTTP/2 is not always faster than a non secured HTTP/1.1
> connection.

We are very interested in these results.
Can you share ?

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Guillaume DROUET

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev