pippo icon indicating copy to clipboard operation
pippo copied to clipboard

The embedded Jetty implementation should use HTTP2

Open Wavesonics opened this issue 6 years ago • 6 comments

We can do this by setting our own Jetty instance that we configure, but I can't see a reason to not enable HTTP2 by default for Jetty, can anyone else?

This is a good example of setting Jetty up correctly for it: https://github.com/fstab/http2-examples/blob/master/jetty-http2-server-example/src/main/java/de/consol/labs/h2c/examples/server/Http2Server.java

Wavesonics avatar Dec 28 '18 19:12 Wavesonics

Oh, here is one potential reason:

// In order to run this, you need the alpn-boot-XXX.jar in the bootstrap classpath

Might be solvable though in a way that makes sense.

Wavesonics avatar Dec 28 '18 19:12 Wavesonics

I guess more broadly, are there any plans to move to Servlet 4.0 to really leverage some of HTTP/2's new features?

Wavesonics avatar Dec 28 '18 19:12 Wavesonics

In this post you can see that I'm OK to switch from Servlet 3.x to Servlet 4.0 if this move brings something valuable on the table.

decebals avatar Dec 28 '18 20:12 decebals

Ah got ya. Ya unless I'm misunderstanding things as well, to really take advantage of server push, Pippo would need a way of parsing the intended HTML output, and enumerating the resources that were going to be needed, That might take some work.

However just re-using HTTP connections would help reduce overhead a lot. I just finished tuning my application to be able to run on a 512MB dyno on Heroku, and boy was it tough to get under that limit. Anything we can do to shrink the footprint of the http server would be a big win.

Wavesonics avatar Dec 28 '18 21:12 Wavesonics

Ah got ya. Ya unless I'm misunderstanding things as well, to really take advantage of server push, Pippo would need a way of parsing the intended HTML output, and enumerating the resources that were going to be needed, That might take some work.

Already done. See https://github.com/pippo-java/pippo/issues/490#issuecomment-456983492.

decebals avatar Jan 24 '19 12:01 decebals

Wow great work!!

Wavesonics avatar Jan 24 '19 18:01 Wavesonics