HTTP/2 support in Maven

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

HTTP/2 support in Maven

Jakub Bartecek
Hello,
I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
haven't found such an option.

If not: Are there any plans to add the support?

Regards,
Kuba
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Tamás Cservenák
Hi

Maven itself does not care about transport being used, it is wagon or
resolver thing. And afair, there is takari okhttp transport that may do
http/2, but unsure...

Hth
Tamas

On Fri, Oct 23, 2020, 10:09 Jakub Bartecek <[hidden email]> wrote:

> Hello,
> I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
> haven't found such an option.
>
> If not: Are there any plans to add the support?
>
> Regards,
> Kuba
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Jakub Bartecek
OK, thanks.

I'll investigate wagon.

Kuba

On Fri, Oct 23, 2020 at 10:45 AM Tamás Cservenák <[hidden email]>
wrote:

> Hi
>
> Maven itself does not care about transport being used, it is wagon or
> resolver thing. And afair, there is takari okhttp transport that may do
> http/2, but unsure...
>
> Hth
> Tamas
>
> On Fri, Oct 23, 2020, 10:09 Jakub Bartecek <[hidden email]> wrote:
>
> > Hello,
> > I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
> > haven't found such an option.
> >
> > If not: Are there any plans to add the support?
> >
> > Regards,
> > Kuba
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

olamy
In reply to this post by Jakub Bartecek
There is some effort started here
https://github.com/jetty-project/jetty-maven-wagon
but this needs more tests/debug etc...
feel free to test,m report issues, propose fix etc...

On Fri, 23 Oct 2020 at 18:09, Jakub Bartecek <[hidden email]> wrote:

> Hello,
> I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
> haven't found such an option.
>
> If not: Are there any plans to add the support?
>
> Regards,
> Kuba
>


--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Benjamin Marwell-2
You need at least java 9 for http/2. Java 11 is a current LTS release which
supports h2.

Is there anything in the transport code preventing h2 transport?

Ben






On Fri, 23 Oct 2020, 11:28 Olivier Lamy, <[hidden email]> wrote:

> There is some effort started here
> https://github.com/jetty-project/jetty-maven-wagon
> but this needs more tests/debug etc...
> feel free to test,m report issues, propose fix etc...
>
> On Fri, 23 Oct 2020 at 18:09, Jakub Bartecek <[hidden email]> wrote:
>
> > Hello,
> > I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
> > haven't found such an option.
> >
> > If not: Are there any plans to add the support?
> >
> > Regards,
> > Kuba
> >
>
>
> --
> Olivier Lamy
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

michaelo
Am 2020-10-24 um 14:25 schrieb Benjamin Marwell:
> You need at least java 9 for http/2. Java 11 is a current LTS release which
> supports h2.

Why? TLS 1.3 and ALPN have been backported to Java 8 recently.

> Is there anything in the transport code preventing h2 transport?

Yes, your participation to do the work!

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

michaelo
In reply to this post by Jakub Bartecek
Am 2020-10-23 um 10:08 schrieb Jakub Bartecek:
> Hello,
> I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
> haven't found such an option.
>
> If not: Are there any plans to add the support?

There is nothing to turn on and that would be unwise, something like
this should be done through ALPN.

Maven uses by default Wagon HTTP Transport on top of Apache
HttpComponents 4.5.x. Beginning with Apache HttpComponent 5.0 HTTP/2 is
supported. One would need to write a new (updated) HTTP Transport to
move all gone.
There is one crucial issue needs to be solved first: HTTPCORE-626. Also
read the related discussion [1].

Is there anything explicitly you expect from HTTP/2 compared to
HTTP/1.1? I have done a lot of internal improvements to Wagon HTTP this
year which covers a lot of use cases.

Have you done testing with curl which proves some kind of improvement?
I have talked about possible benefits of HTTP/2 in corporate
environments with jfclere@ and he sees little benefit because when you
have a repo manager in house, you have (a) a gigabit connection and (b)
minimal hops between client and repo manager.

Michael

[1]
https://www.mail-archive.com/httpclient-users@.../msg09851.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Benjamin Marwell
In reply to this post by michaelo
While TLS 1.3 and ALPN (and ciphers) may have been backported, I am not
aware of http2 being backported to Java 8. Even if it was, it would not be
part of EVERY JVM implementation, eg Eclipse OpenJ9.





On Sun, 25 Oct 2020, 09:52 Michael Osipov, <[hidden email]> wrote:

> Am 2020-10-24 um 14:25 schrieb Benjamin Marwell:
> > You need at least java 9 for http/2. Java 11 is a current LTS release
> which
> > supports h2.
>
> Why? TLS 1.3 and ALPN have been backported to Java 8 recently.
>
> > Is there anything in the transport code preventing h2 transport?
>
> Yes, your participation to do the work!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

michaelo
Am 2020-10-25 um 19:09 schrieb Benjamin Marwell:
> While TLS 1.3 and ALPN (and ciphers) may have been backported, I am not
> aware of http2 being backported to Java 8. Even if it was, it would not be
> part of EVERY JVM implementation, eg Eclipse OpenJ9.

You are talking non-sense. Don't mix lower level protocols like TLS with
application protocols. Moreover, there is still h2c.

Tomcat 8.5+ just works fine with h2 and h2c when connected via curl.

> On Sun, 25 Oct 2020, 09:52 Michael Osipov, <[hidden email]> wrote:
>
>> Am 2020-10-24 um 14:25 schrieb Benjamin Marwell:
>>> You need at least java 9 for http/2. Java 11 is a current LTS release
>> which
>>> supports h2.
>>
>> Why? TLS 1.3 and ALPN have been backported to Java 8 recently.
>>
>>> Is there anything in the transport code preventing h2 transport?
>>
>> Yes, your participation to do the work!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Benjamin Marwell
http/2 is not available before Java 8.
ALPN and TLS 1.3 are requirements for h2.

I saw httpClient 5 implemented http/2. That's fine and that's why you may
have successfully connected tomcat with a http/2 client.

Try another application server which does not use httpClient, e.g.
OpenLiberty. You will not be able to have a http/2 server side protocol
support.


I hope this helped for clarification. Thus, I consider my previous mail
*not* nonsense.

If maven didn't use httpClient (which I was not aware of at time of
writing), my statement would have been true: just use Java 9+ and it will
connect via http/2.

I am sorry this caused confusion, but I did not like your response which
did sound "aggressive" to me. I will therefore not contribute to this
project soon.


On Sun, 25 Oct 2020, 19:54 Michael Osipov, <[hidden email]> wrote:

> Am 2020-10-25 um 19:09 schrieb Benjamin Marwell:
> > While TLS 1.3 and ALPN (and ciphers) may have been backported, I am not
> > aware of http2 being backported to Java 8. Even if it was, it would not
> be
> > part of EVERY JVM implementation, eg Eclipse OpenJ9.
>
> You are talking non-sense. Don't mix lower level protocols like TLS with
> application protocols. Moreover, there is still h2c.
>
> Tomcat 8.5+ just works fine with h2 and h2c when connected via curl.
>
> > On Sun, 25 Oct 2020, 09:52 Michael Osipov, <[hidden email]> wrote:
> >
> >> Am 2020-10-24 um 14:25 schrieb Benjamin Marwell:
> >>> You need at least java 9 for http/2. Java 11 is a current LTS release
> >> which
> >>> supports h2.
> >>
> >> Why? TLS 1.3 and ALPN have been backported to Java 8 recently.
> >>
> >>> Is there anything in the transport code preventing h2 transport?
> >>
> >> Yes, your participation to do the work!
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Jakub Bartecek
In reply to this post by michaelo
On Sun, Oct 25, 2020 at 10:25 AM Michael Osipov <[hidden email]> wrote:

> Am 2020-10-23 um 10:08 schrieb Jakub Bartecek:
> > Hello,
> > I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
> > haven't found such an option.
> >
> > If not: Are there any plans to add the support?
>
> There is nothing to turn on and that would be unwise, something like
> this should be done through ALPN.
>
> Maven uses by default Wagon HTTP Transport on top of Apache
> HttpComponents 4.5.x. Beginning with Apache HttpComponent 5.0 HTTP/2 is
> supported. One would need to write a new (updated) HTTP Transport to
> move all gone.
> There is one crucial issue needs to be solved first: HTTPCORE-626. Also
> read the related discussion [1].
>
> Is there anything explicitly you expect from HTTP/2 compared to
> HTTP/1.1? I have done a lot of internal improvements to Wagon HTTP this
> year which covers a lot of use cases.
>
> Have you done testing with curl which proves some kind of improvement?
> I have talked about possible benefits of HTTP/2 in corporate
> environments with jfclere@ and he sees little benefit because when you
> have a repo manager in house, you have (a) a gigabit connection and (b)
> minimal hops between client and repo manager.
>

Thanks for the clarification.

I wanted to test out if there are significant performance improvements with
HTTP/2 (which I hoped there could be),
but I haven't done any measurements by simulating it with curl. My first
idea was to try it with Maven directly

Jakub


>
> Michael
>
> [1]
> https://www.mail-archive.com/httpclient-users@.../msg09851.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

michaelo
Am 2020-10-26 um 15:01 schrieb Jakub Bartecek:

> On Sun, Oct 25, 2020 at 10:25 AM Michael Osipov <[hidden email]> wrote:
>
>> Am 2020-10-23 um 10:08 schrieb Jakub Bartecek:
>>> Hello,
>>> I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
>>> haven't found such an option.
>>>
>>> If not: Are there any plans to add the support?
>>
>> There is nothing to turn on and that would be unwise, something like
>> this should be done through ALPN.
>>
>> Maven uses by default Wagon HTTP Transport on top of Apache
>> HttpComponents 4.5.x. Beginning with Apache HttpComponent 5.0 HTTP/2 is
>> supported. One would need to write a new (updated) HTTP Transport to
>> move all gone.
>> There is one crucial issue needs to be solved first: HTTPCORE-626. Also
>> read the related discussion [1].
>>
>> Is there anything explicitly you expect from HTTP/2 compared to
>> HTTP/1.1? I have done a lot of internal improvements to Wagon HTTP this
>> year which covers a lot of use cases.
>>
>> Have you done testing with curl which proves some kind of improvement?
>> I have talked about possible benefits of HTTP/2 in corporate
>> environments with jfclere@ and he sees little benefit because when you
>> have a repo manager in house, you have (a) a gigabit connection and (b)
>> minimal hops between client and repo manager.
>>
>
> Thanks for the clarification.
>
> I wanted to test out if there are significant performance improvements with
> HTTP/2 (which I hoped there could be),
> but I haven't done any measurements by simulating it with curl. My first
> idea was to try it with Maven directly

Please do that first to have any numbers to compare. I don't see to put
any effort into something which will deliver a single digit percent
improvement given the amount of work.

Share numbers when you are ready.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Jakub Bartecek
I'll do some measurements and share the results with you. If it turns out
that it is worth the effort, how much work does it require? I'm considering
contributing it to Maven (or someone from my team).

If it is contributed today, when can it be in an official Maven release?

On Mon, Oct 26, 2020 at 7:09 PM Michael Osipov <[hidden email]> wrote:

> Am 2020-10-26 um 15:01 schrieb Jakub Bartecek:
> > On Sun, Oct 25, 2020 at 10:25 AM Michael Osipov <[hidden email]>
> wrote:
> >
> >> Am 2020-10-23 um 10:08 schrieb Jakub Bartecek:
> >>> Hello,
> >>> I'd like to ask if it is possible to turn on HTTP/2 support in Maven. I
> >>> haven't found such an option.
> >>>
> >>> If not: Are there any plans to add the support?
> >>
> >> There is nothing to turn on and that would be unwise, something like
> >> this should be done through ALPN.
> >>
> >> Maven uses by default Wagon HTTP Transport on top of Apache
> >> HttpComponents 4.5.x. Beginning with Apache HttpComponent 5.0 HTTP/2 is
> >> supported. One would need to write a new (updated) HTTP Transport to
> >> move all gone.
> >> There is one crucial issue needs to be solved first: HTTPCORE-626. Also
> >> read the related discussion [1].
> >>
> >> Is there anything explicitly you expect from HTTP/2 compared to
> >> HTTP/1.1? I have done a lot of internal improvements to Wagon HTTP this
> >> year which covers a lot of use cases.
> >>
> >> Have you done testing with curl which proves some kind of improvement?
> >> I have talked about possible benefits of HTTP/2 in corporate
> >> environments with jfclere@ and he sees little benefit because when you
> >> have a repo manager in house, you have (a) a gigabit connection and (b)
> >> minimal hops between client and repo manager.
> >>
> >
> > Thanks for the clarification.
> >
> > I wanted to test out if there are significant performance improvements
> with
> > HTTP/2 (which I hoped there could be),
> > but I haven't done any measurements by simulating it with curl. My first
> > idea was to try it with Maven directly
>
> Please do that first to have any numbers to compare. I don't see to put
> any effort into something which will deliver a single digit percent
> improvement given the amount of work.
>
> Share numbers when you are ready.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Jakub Bartecek
Hi,
I did a performance test of HTTP/2 and its comparison with HTTP/1.1 and I
would like to share my results with you.

I wrote a Python script [1] to download 100 artifacts in parallel using
asynchronous HTTP client supporting both HTTP/1.1 and HTTP/2. I chose 100
artifacts [2] from Maven Central, which were downloaded when I did a clean
build of one of my projects.

All 100 artifacts were downloaded using HTTP/1.1 and also HTTP/2 and I
stored the results in this file [3]. I did 10 experiments and measured its
performance. In the middle I switch the order of HTTP/1.1 and HTTP/2
requests to avoid a possible bias. I run it from my laptop connected to 160
Mbit/s network.

The experiments showed massive performance improvements when using HTTP/2
instead of HTTP/1.1
*:*

   - *The average download time using HTTP/1.1 was 3753.7 ms and using
   HTTP/2 971.8 ms* [4]


   - *In average the artifacts were downloaded 3.86 times faster using
   HTTP/2 than using HTTP/1.1* [5]


Kuba

[1]: https://github.com/jbartece/http2performance/blob/main/http2PerfTest.py
[2]: https://github.com/jbartece/http2performance/blob/main/centralUrls.txt
[3]: https://github.com/jbartece/http2performance/blob/main/testResults.txt
[4]:
https://github.com/jbartece/http2performance/blob/main/finalResults.txt#L26
[5]:
https://github.com/jbartece/http2performance/blob/main/finalResults.txt#L32


On Tue, Oct 27, 2020 at 8:42 AM Jakub Bartecek <[hidden email]> wrote:

> I'll do some measurements and share the results with you. If it turns out
> that it is worth the effort, how much work does it require? I'm considering
> contributing it to Maven (or someone from my team).
>
> If it is contributed today, when can it be in an official Maven release?
>
> On Mon, Oct 26, 2020 at 7:09 PM Michael Osipov <[hidden email]>
> wrote:
>
>> Am 2020-10-26 um 15:01 schrieb Jakub Bartecek:
>> > On Sun, Oct 25, 2020 at 10:25 AM Michael Osipov <[hidden email]>
>> wrote:
>> >
>> >> Am 2020-10-23 um 10:08 schrieb Jakub Bartecek:
>> >>> Hello,
>> >>> I'd like to ask if it is possible to turn on HTTP/2 support in Maven.
>> I
>> >>> haven't found such an option.
>> >>>
>> >>> If not: Are there any plans to add the support?
>> >>
>> >> There is nothing to turn on and that would be unwise, something like
>> >> this should be done through ALPN.
>> >>
>> >> Maven uses by default Wagon HTTP Transport on top of Apache
>> >> HttpComponents 4.5.x. Beginning with Apache HttpComponent 5.0 HTTP/2 is
>> >> supported. One would need to write a new (updated) HTTP Transport to
>> >> move all gone.
>> >> There is one crucial issue needs to be solved first: HTTPCORE-626. Also
>> >> read the related discussion [1].
>> >>
>> >> Is there anything explicitly you expect from HTTP/2 compared to
>> >> HTTP/1.1? I have done a lot of internal improvements to Wagon HTTP this
>> >> year which covers a lot of use cases.
>> >>
>> >> Have you done testing with curl which proves some kind of improvement?
>> >> I have talked about possible benefits of HTTP/2 in corporate
>> >> environments with jfclere@ and he sees little benefit because when you
>> >> have a repo manager in house, you have (a) a gigabit connection and (b)
>> >> minimal hops between client and repo manager.
>> >>
>> >
>> > Thanks for the clarification.
>> >
>> > I wanted to test out if there are significant performance improvements
>> with
>> > HTTP/2 (which I hoped there could be),
>> > but I haven't done any measurements by simulating it with curl. My first
>> > idea was to try it with Maven directly
>>
>> Please do that first to have any numbers to compare. I don't see to put
>> any effort into something which will deliver a single digit percent
>> improvement given the amount of work.
>>
>> Share numbers when you are ready.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Tamás Cservenák
Hi Kuba,

Can you clarify what exactly your script does re "download"?
It seems it issues HTTP GET, but does it fully consume response?
Does it get all the bytes of the artifact, or just the parses response
header(s) and throws the rest?

Thanks
T

On Thu, Nov 5, 2020 at 4:49 PM Jakub Bartecek <[hidden email]> wrote:

> Hi,
> I did a performance test of HTTP/2 and its comparison with HTTP/1.1 and I
> would like to share my results with you.
>
> I wrote a Python script [1] to download 100 artifacts in parallel using
> asynchronous HTTP client supporting both HTTP/1.1 and HTTP/2. I chose 100
> artifacts [2] from Maven Central, which were downloaded when I did a clean
> build of one of my projects.
>
> All 100 artifacts were downloaded using HTTP/1.1 and also HTTP/2 and I
> stored the results in this file [3]. I did 10 experiments and measured its
> performance. In the middle I switch the order of HTTP/1.1 and HTTP/2
> requests to avoid a possible bias. I run it from my laptop connected to 160
> Mbit/s network.
>
> The experiments showed massive performance improvements when using HTTP/2
> instead of HTTP/1.1
> *:*
>
>    - *The average download time using HTTP/1.1 was 3753.7 ms and using
>    HTTP/2 971.8 ms* [4]
>
>
>    - *In average the artifacts were downloaded 3.86 times faster using
>    HTTP/2 than using HTTP/1.1* [5]
>
>
> Kuba
>
> [1]:
> https://github.com/jbartece/http2performance/blob/main/http2PerfTest.py
> [2]:
> https://github.com/jbartece/http2performance/blob/main/centralUrls.txt
> [3]:
> https://github.com/jbartece/http2performance/blob/main/testResults.txt
> [4]:
> https://github.com/jbartece/http2performance/blob/main/finalResults.txt#L26
> [5]:
> https://github.com/jbartece/http2performance/blob/main/finalResults.txt#L32
>
>
> On Tue, Oct 27, 2020 at 8:42 AM Jakub Bartecek <[hidden email]>
> wrote:
>
> > I'll do some measurements and share the results with you. If it turns out
> > that it is worth the effort, how much work does it require? I'm
> considering
> > contributing it to Maven (or someone from my team).
> >
> > If it is contributed today, when can it be in an official Maven release?
> >
> > On Mon, Oct 26, 2020 at 7:09 PM Michael Osipov <[hidden email]>
> > wrote:
> >
> >> Am 2020-10-26 um 15:01 schrieb Jakub Bartecek:
> >> > On Sun, Oct 25, 2020 at 10:25 AM Michael Osipov <[hidden email]>
> >> wrote:
> >> >
> >> >> Am 2020-10-23 um 10:08 schrieb Jakub Bartecek:
> >> >>> Hello,
> >> >>> I'd like to ask if it is possible to turn on HTTP/2 support in
> Maven.
> >> I
> >> >>> haven't found such an option.
> >> >>>
> >> >>> If not: Are there any plans to add the support?
> >> >>
> >> >> There is nothing to turn on and that would be unwise, something like
> >> >> this should be done through ALPN.
> >> >>
> >> >> Maven uses by default Wagon HTTP Transport on top of Apache
> >> >> HttpComponents 4.5.x. Beginning with Apache HttpComponent 5.0 HTTP/2
> is
> >> >> supported. One would need to write a new (updated) HTTP Transport to
> >> >> move all gone.
> >> >> There is one crucial issue needs to be solved first: HTTPCORE-626.
> Also
> >> >> read the related discussion [1].
> >> >>
> >> >> Is there anything explicitly you expect from HTTP/2 compared to
> >> >> HTTP/1.1? I have done a lot of internal improvements to Wagon HTTP
> this
> >> >> year which covers a lot of use cases.
> >> >>
> >> >> Have you done testing with curl which proves some kind of
> improvement?
> >> >> I have talked about possible benefits of HTTP/2 in corporate
> >> >> environments with jfclere@ and he sees little benefit because when
> you
> >> >> have a repo manager in house, you have (a) a gigabit connection and
> (b)
> >> >> minimal hops between client and repo manager.
> >> >>
> >> >
> >> > Thanks for the clarification.
> >> >
> >> > I wanted to test out if there are significant performance improvements
> >> with
> >> > HTTP/2 (which I hoped there could be),
> >> > but I haven't done any measurements by simulating it with curl. My
> first
> >> > idea was to try it with Maven directly
> >>
> >> Please do that first to have any numbers to compare. I don't see to put
> >> any effort into something which will deliver a single digit percent
> >> improvement given the amount of work.
> >>
> >> Share numbers when you are ready.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Tamás Cservenák
I ran your script _unchanged_ on my machine and got this result:
https://gist.github.com/cstamas/b70f85ad601e5e2f399596b2e8cec7d1

Interestingly, http1 is quite "stable" -- roughly around 800ms
while http2 is quite "jumpy" -- goes from 600 to 920ms

Will try to add change to get the response content as well....

Thanks
T

On Thu, Nov 5, 2020 at 5:09 PM Tamás Cservenák <[hidden email]> wrote:

> Hi Kuba,
>
> Can you clarify what exactly your script does re "download"?
> It seems it issues HTTP GET, but does it fully consume response?
> Does it get all the bytes of the artifact, or just the parses response
> header(s) and throws the rest?
>
> Thanks
> T
>
> On Thu, Nov 5, 2020 at 4:49 PM Jakub Bartecek <[hidden email]> wrote:
>
>> Hi,
>> I did a performance test of HTTP/2 and its comparison with HTTP/1.1 and I
>> would like to share my results with you.
>>
>> I wrote a Python script [1] to download 100 artifacts in parallel using
>> asynchronous HTTP client supporting both HTTP/1.1 and HTTP/2. I chose 100
>> artifacts [2] from Maven Central, which were downloaded when I did a clean
>> build of one of my projects.
>>
>> All 100 artifacts were downloaded using HTTP/1.1 and also HTTP/2 and I
>> stored the results in this file [3]. I did 10 experiments and measured its
>> performance. In the middle I switch the order of HTTP/1.1 and HTTP/2
>> requests to avoid a possible bias. I run it from my laptop connected to
>> 160
>> Mbit/s network.
>>
>> The experiments showed massive performance improvements when using HTTP/2
>> instead of HTTP/1.1
>> *:*
>>
>>    - *The average download time using HTTP/1.1 was 3753.7 ms and using
>>    HTTP/2 971.8 ms* [4]
>>
>>
>>    - *In average the artifacts were downloaded 3.86 times faster using
>>    HTTP/2 than using HTTP/1.1* [5]
>>
>>
>> Kuba
>>
>> [1]:
>> https://github.com/jbartece/http2performance/blob/main/http2PerfTest.py
>> [2]:
>> https://github.com/jbartece/http2performance/blob/main/centralUrls.txt
>> [3]:
>> https://github.com/jbartece/http2performance/blob/main/testResults.txt
>> [4]:
>>
>> https://github.com/jbartece/http2performance/blob/main/finalResults.txt#L26
>> [5]:
>>
>> https://github.com/jbartece/http2performance/blob/main/finalResults.txt#L32
>>
>>
>> On Tue, Oct 27, 2020 at 8:42 AM Jakub Bartecek <[hidden email]>
>> wrote:
>>
>> > I'll do some measurements and share the results with you. If it turns
>> out
>> > that it is worth the effort, how much work does it require? I'm
>> considering
>> > contributing it to Maven (or someone from my team).
>> >
>> > If it is contributed today, when can it be in an official Maven release?
>> >
>> > On Mon, Oct 26, 2020 at 7:09 PM Michael Osipov <[hidden email]>
>> > wrote:
>> >
>> >> Am 2020-10-26 um 15:01 schrieb Jakub Bartecek:
>> >> > On Sun, Oct 25, 2020 at 10:25 AM Michael Osipov <[hidden email]
>> >
>> >> wrote:
>> >> >
>> >> >> Am 2020-10-23 um 10:08 schrieb Jakub Bartecek:
>> >> >>> Hello,
>> >> >>> I'd like to ask if it is possible to turn on HTTP/2 support in
>> Maven.
>> >> I
>> >> >>> haven't found such an option.
>> >> >>>
>> >> >>> If not: Are there any plans to add the support?
>> >> >>
>> >> >> There is nothing to turn on and that would be unwise, something like
>> >> >> this should be done through ALPN.
>> >> >>
>> >> >> Maven uses by default Wagon HTTP Transport on top of Apache
>> >> >> HttpComponents 4.5.x. Beginning with Apache HttpComponent 5.0
>> HTTP/2 is
>> >> >> supported. One would need to write a new (updated) HTTP Transport to
>> >> >> move all gone.
>> >> >> There is one crucial issue needs to be solved first: HTTPCORE-626.
>> Also
>> >> >> read the related discussion [1].
>> >> >>
>> >> >> Is there anything explicitly you expect from HTTP/2 compared to
>> >> >> HTTP/1.1? I have done a lot of internal improvements to Wagon HTTP
>> this
>> >> >> year which covers a lot of use cases.
>> >> >>
>> >> >> Have you done testing with curl which proves some kind of
>> improvement?
>> >> >> I have talked about possible benefits of HTTP/2 in corporate
>> >> >> environments with jfclere@ and he sees little benefit because when
>> you
>> >> >> have a repo manager in house, you have (a) a gigabit connection and
>> (b)
>> >> >> minimal hops between client and repo manager.
>> >> >>
>> >> >
>> >> > Thanks for the clarification.
>> >> >
>> >> > I wanted to test out if there are significant performance
>> improvements
>> >> with
>> >> > HTTP/2 (which I hoped there could be),
>> >> > but I haven't done any measurements by simulating it with curl. My
>> first
>> >> > idea was to try it with Maven directly
>> >>
>> >> Please do that first to have any numbers to compare. I don't see to put
>> >> any effort into something which will deliver a single digit percent
>> >> improvement given the amount of work.
>> >>
>> >> Share numbers when you are ready.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [hidden email]
>> >> For additional commands, e-mail: [hidden email]
>> >>
>> >>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Tamás Cservenák
https://gist.github.com/cstamas/f87a12920d3c28e5db024dcd2f1a5d5f

Given almost the same times, it seems it did consume :)

Still, the factor of 3.8 is not seen by me....
(plain cable modem)

Thanks
T

On Thu, Nov 5, 2020 at 5:23 PM Tamás Cservenák <[hidden email]> wrote:

> I ran your script _unchanged_ on my machine and got this result:
> https://gist.github.com/cstamas/b70f85ad601e5e2f399596b2e8cec7d1
>
> Interestingly, http1 is quite "stable" -- roughly around 800ms
> while http2 is quite "jumpy" -- goes from 600 to 920ms
>
> Will try to add change to get the response content as well....
>
> Thanks
> T
>
> On Thu, Nov 5, 2020 at 5:09 PM Tamás Cservenák <[hidden email]>
> wrote:
>
>> Hi Kuba,
>>
>> Can you clarify what exactly your script does re "download"?
>> It seems it issues HTTP GET, but does it fully consume response?
>> Does it get all the bytes of the artifact, or just the parses response
>> header(s) and throws the rest?
>>
>> Thanks
>> T
>>
>> On Thu, Nov 5, 2020 at 4:49 PM Jakub Bartecek <[hidden email]>
>> wrote:
>>
>>> Hi,
>>> I did a performance test of HTTP/2 and its comparison with HTTP/1.1 and I
>>> would like to share my results with you.
>>>
>>> I wrote a Python script [1] to download 100 artifacts in parallel using
>>> asynchronous HTTP client supporting both HTTP/1.1 and HTTP/2. I chose 100
>>> artifacts [2] from Maven Central, which were downloaded when I did a
>>> clean
>>> build of one of my projects.
>>>
>>> All 100 artifacts were downloaded using HTTP/1.1 and also HTTP/2 and I
>>> stored the results in this file [3]. I did 10 experiments and measured
>>> its
>>> performance. In the middle I switch the order of HTTP/1.1 and HTTP/2
>>> requests to avoid a possible bias. I run it from my laptop connected to
>>> 160
>>> Mbit/s network.
>>>
>>> The experiments showed massive performance improvements when using HTTP/2
>>> instead of HTTP/1.1
>>> *:*
>>>
>>>    - *The average download time using HTTP/1.1 was 3753.7 ms and using
>>>    HTTP/2 971.8 ms* [4]
>>>
>>>
>>>    - *In average the artifacts were downloaded 3.86 times faster using
>>>    HTTP/2 than using HTTP/1.1* [5]
>>>
>>>
>>> Kuba
>>>
>>> [1]:
>>> https://github.com/jbartece/http2performance/blob/main/http2PerfTest.py
>>> [2]:
>>> https://github.com/jbartece/http2performance/blob/main/centralUrls.txt
>>> [3]:
>>> https://github.com/jbartece/http2performance/blob/main/testResults.txt
>>> [4]:
>>>
>>> https://github.com/jbartece/http2performance/blob/main/finalResults.txt#L26
>>> [5]:
>>>
>>> https://github.com/jbartece/http2performance/blob/main/finalResults.txt#L32
>>>
>>>
>>> On Tue, Oct 27, 2020 at 8:42 AM Jakub Bartecek <[hidden email]>
>>> wrote:
>>>
>>> > I'll do some measurements and share the results with you. If it turns
>>> out
>>> > that it is worth the effort, how much work does it require? I'm
>>> considering
>>> > contributing it to Maven (or someone from my team).
>>> >
>>> > If it is contributed today, when can it be in an official Maven
>>> release?
>>> >
>>> > On Mon, Oct 26, 2020 at 7:09 PM Michael Osipov <[hidden email]>
>>> > wrote:
>>> >
>>> >> Am 2020-10-26 um 15:01 schrieb Jakub Bartecek:
>>> >> > On Sun, Oct 25, 2020 at 10:25 AM Michael Osipov <
>>> [hidden email]>
>>> >> wrote:
>>> >> >
>>> >> >> Am 2020-10-23 um 10:08 schrieb Jakub Bartecek:
>>> >> >>> Hello,
>>> >> >>> I'd like to ask if it is possible to turn on HTTP/2 support in
>>> Maven.
>>> >> I
>>> >> >>> haven't found such an option.
>>> >> >>>
>>> >> >>> If not: Are there any plans to add the support?
>>> >> >>
>>> >> >> There is nothing to turn on and that would be unwise, something
>>> like
>>> >> >> this should be done through ALPN.
>>> >> >>
>>> >> >> Maven uses by default Wagon HTTP Transport on top of Apache
>>> >> >> HttpComponents 4.5.x. Beginning with Apache HttpComponent 5.0
>>> HTTP/2 is
>>> >> >> supported. One would need to write a new (updated) HTTP Transport
>>> to
>>> >> >> move all gone.
>>> >> >> There is one crucial issue needs to be solved first: HTTPCORE-626.
>>> Also
>>> >> >> read the related discussion [1].
>>> >> >>
>>> >> >> Is there anything explicitly you expect from HTTP/2 compared to
>>> >> >> HTTP/1.1? I have done a lot of internal improvements to Wagon HTTP
>>> this
>>> >> >> year which covers a lot of use cases.
>>> >> >>
>>> >> >> Have you done testing with curl which proves some kind of
>>> improvement?
>>> >> >> I have talked about possible benefits of HTTP/2 in corporate
>>> >> >> environments with jfclere@ and he sees little benefit because
>>> when you
>>> >> >> have a repo manager in house, you have (a) a gigabit connection
>>> and (b)
>>> >> >> minimal hops between client and repo manager.
>>> >> >>
>>> >> >
>>> >> > Thanks for the clarification.
>>> >> >
>>> >> > I wanted to test out if there are significant performance
>>> improvements
>>> >> with
>>> >> > HTTP/2 (which I hoped there could be),
>>> >> > but I haven't done any measurements by simulating it with curl. My
>>> first
>>> >> > idea was to try it with Maven directly
>>> >>
>>> >> Please do that first to have any numbers to compare. I don't see to
>>> put
>>> >> any effort into something which will deliver a single digit percent
>>> >> improvement given the amount of work.
>>> >>
>>> >> Share numbers when you are ready.
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: [hidden email]
>>> >> For additional commands, e-mail: [hidden email]
>>> >>
>>> >>
>>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Tamás Cservenák
(short disclaimer: am not a python speaking person, so the change I did
above with intent to "consume response body, the artifact bytes" may not
did what I wanted :D)
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Jakub Bartecek
Hi,
I'll look at it tomorrow and try to verify it really downloads the whole
content, I did some checks on POM files and it really downloaded it.

Thanks for testing it from your machine. It's interesting to see that you
have completely different results. Honestly I'm not sure how that is
possible, but I'll think about it more tomorrow. I'm about to call it a day
now.

Kuba

On Thu, Nov 5, 2020 at 6:10 PM Tamás Cservenák <[hidden email]> wrote:

> (short disclaimer: am not a python speaking person, so the change I did
> above with intent to "consume response body, the artifact bytes" may not
> did what I wanted :D)
>
Reply | Threaded
Open this post in threaded view
|

Re: HTTP/2 support in Maven

Bernd Eckenfels
Hello,

I don’t really see where http/2 should have a speed performance compared to http/1.1 as long as both use keepalive. For larger artifacts even the header reduction should be negectible. Having said that, it is of course a good idea to go with the new protocols, but I would not expect much advantage. Especially not if you limit yourself to one or two tcp connections per repository.

Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
Von: Jakub Bartecek <[hidden email]>
Gesendet: Thursday, November 5, 2020 6:28:05 PM
An: Maven Users List <[hidden email]>
Betreff: Re: HTTP/2 support in Maven

Hi,
I'll look at it tomorrow and try to verify it really downloads the whole
content, I did some checks on POM files and it really downloaded it.

Thanks for testing it from your machine. It's interesting to see that you
have completely different results. Honestly I'm not sure how that is
possible, but I'll think about it more tomorrow. I'm about to call it a day
now.

Kuba

On Thu, Nov 5, 2020 at 6:10 PM Tamás Cservenák <[hidden email]> wrote:

> (short disclaimer: am not a python speaking person, so the change I did
> above with intent to "consume response body, the artifact bytes" may not
> did what I wanted :D)
>
12