nextcloud-snap icon indicating copy to clipboard operation
nextcloud-snap copied to clipboard

Add HTTP/2 support

Open escoand opened this issue 8 years ago • 22 comments

Please add the support for HTTP/2 which seems to be a huge speed up and hassle free. https://httpd.apache.org/docs/2.4/howto/http2.html https://help.nextcloud.com/t/http-2-yes-or-no/4026/35

escoand avatar Jun 01 '17 09:06 escoand

Pretty much the entire forum thread you reference talks about how HTTP/2 has no performance benefit, and a few comments say images don't load sometimes, etc.

kyrofa avatar Jun 01 '17 09:06 kyrofa

Ok, maybe we have to wait a bit for HTTP/2 support evolves. The comments say the nginx doesn't have this image problems. Hopefully the performance will get better as well. The files app (with cleaned cache) needs over 200 requests, in theory HTTP/2 has to speed up this.

theory and practice...

escoand avatar Jun 01 '17 10:06 escoand

There are also security issues with HTTP/2. I couldn't remember what they were so I googled it: defcon http/2 vulnerable (my source was from a talk at DEFCON so I searched for that)

TangentFoxy avatar Jan 13 '18 06:01 TangentFoxy

How about implementing http/2 as an opt-in feature?

bn4t avatar May 08 '18 05:05 bn4t

That is a more reasonable request.

TangentFoxy avatar May 09 '18 04:05 TangentFoxy

Why did you close this @escoand ? The integration work is almost done, but we are still evaluating it's feasibility and impact.

pachulo avatar Aug 13 '18 22:08 pachulo

Yeah let's leave this open, we're still investigating.

kyrofa avatar Aug 13 '18 22:08 kyrofa

Oh fine, good to hear that. I walked through my issues without any reactions since months and cleaned my list a bit. Sorry for the inconveniences.

escoand avatar Aug 14 '18 04:08 escoand

Great summary of the current status of HTTP/2 and known issues: https://almanac.httparchive.org/en/2019/http2

pachulo avatar Dec 11 '19 08:12 pachulo

Will http2 be added for version 19?

If not is there a a way to do it manually? That is if there is any point in doing it? :)

Thanks for your work on this snap.

hannesolsson avatar May 26 '20 09:05 hannesolsson

Hello all!

What's the status on this please?

I found https://github.com/nextcloud/nextcloud-snap/issues/1026#issuecomment-495777495 and decided to lab a bit, but can't see any difference after enabling the experimental feature.

The protocol is still http/1.1 according to output in Chrome browser Dev tools. Any hints, tips or tricks? Thanks.

Edit: My mistake, I apologize! I do see "h2" for some parts, but also a lot of http/1.1! Seems the snap is in some kind of mixed mode or just falling back to the http1?

adrianvg avatar Feb 25 '21 19:02 adrianvg

Well, maybe it was a good idea not enabling this... From https://portswigger.net/research/http2

I reported this to Apache on the 11th May, and they confirmed it within 24 hours, reserved CVE-2021-33193, and said this issue will be patched in 2.4.49. Unfortunately, at the time of this whitepaper being published - 86 days after Apache was notified of the vulnerability - 2.4.49 not yet come out, so although there's a patch on master, this is effectively a zero-day. As a mitigation, you could disable HTTP/2.

pachulo avatar Aug 06 '21 08:08 pachulo

Well, maybe it was a good idea not enabling this... From https://portswigger.net/research/http2

So it seems. Thanks for the heads up.

adrianvg avatar Aug 07 '21 07:08 adrianvg

This issue is stale because it has been without activity for 60 days. It will be closed after 7 more days of inactivity.

github-actions[bot] avatar Dec 03 '21 00:12 github-actions[bot]

This is the same request as in #298. Is there still reason to not enable this yet? The security issues identified are for a mixed http2 to client and http1 to the backend which shouldn’t be an issue here.

@sachingupta010 well, the question was always: why should we add this to the snap? I mean, I participated on the effort to make it possible, but in the end we were not able to measure any benefit when enabling it on nextcloud. Do you have more info on that?

pachulo avatar Dec 19 '21 22:12 pachulo

As per the notes on Server Tuning on the Nextcloud Manual, http/2 provides performance gains. https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html

I have tested this myself on a vanilla install of Nextcloud (not on snap) and seen the difference first hand. I do not know why you did not see a difference in the snap. Unfortunately it is not an apples to apples comparison.

46.9% of sites today use http2 so it is apretty established and stable.

https://w3techs.com/technologies/details/ce-http2

With http/3 coming out, the adaptation of http/2 will likely keep increasing.

I like using the Nextcloud snap as it allows me to spool an instance within 10 minutes instead of an hour it take if I did a vanilla install. However, there are a few things that I miss in the snap. TLS-ALPN-01 is one of them and http/2 is another.

sachingupta010 avatar Dec 19 '21 22:12 sachingupta010

I have tested this myself on a vanilla install of Nextcloud (not on snap) and seen the difference first hand

Do you have numbers or graphs?

pachulo avatar Dec 19 '21 22:12 pachulo

I am sorry, I did this test some time ago and it was not intended to be a comparison but became one due to happenstance. I did not record the results. Essentially I installed Nextcloud and uploaded several hundred GB of smallish files, then wiped the instance, enabled http/2 and did another upload. The uploads with http/2 happened much faster (atleast 30% since that is the time I perceptually saved) I am assuming because http/2 multiplexes over a single tcp connection.

Sorry I can’t be more helpful.

sachingupta010 avatar Dec 19 '21 22:12 sachingupta010

I think that the nextcloud-snap need the HTTP2, at least as an option. The page load would benefit a lot.

negativesymptomatic avatar Jul 28 '22 09:07 negativesymptomatic

I'd also like to bump and revive this topic. Given that the official manual indicates performance gains should be expected when enabling HTTP/2, I feel that enabling it as an opt-in would be simple and effective, without risk of causing instability in existing environments

lexiconzero avatar Jan 06 '23 03:01 lexiconzero

Hi, Is there any progress on this issue ? Web interface is extremaly slow with http/1.1...

Phils80 avatar Dec 01 '23 12:12 Phils80

This would also greatly benefit the deck app, which makes a lot of requests.

It appears this would be as simple as adding to /snap/nextcloud/current/conf/httpd.conf but of course this is unwritable since it's a snap so users can't do it.

user8446 avatar Feb 20 '24 19:02 user8446