unit icon indicating copy to clipboard operation
unit copied to clipboard

HTTP/2 support

Open ghost opened this issue 5 years ago • 21 comments

ghost avatar Feb 06 '20 12:02 ghost

Any update when this will be available?

robjr avatar May 20 '20 23:05 robjr

Any update when this will be available?

There's no ETA yet. Right now this isn't a top priority feature as Unit still lacks some essential functionality like SNI or statistics API. HTTP/2 can be temporary compensated via nginx proxy in front.

Anyway, I hope to see HTTP/2 till the end of the year at least in some limited support.

Could you elaborate a bit more about your case? Do you need HTTP/2 on client side, or for proxy as well?

VBart avatar May 21 '20 12:05 VBart

Thanks @VBart I wanted to have the header compression benefit on a small service where only Nginx unit is enough, but then I will add nginx in front.

robjr avatar Jun 08 '20 04:06 robjr

Hmm when you need to resort to proxy passing a nginx server in front of unit doesn't it defeat the general purpose of unit? Because when you need to proxy pass anyway, why not nginx proxy pass it directly to your native app service instead of unit? Don't get me wrong I do see why unit is a very nice app server, but if you need to put a proxy in front of it anyway that kind of defeats the purpose of a all in one easy to maintain app server I would think?

I am also having a hard time understanding why large portions of the nginx code base can't be used for http2? It just worries me a bit that it takes so long to implement http2, I mean http3 is just around the corner :) and if http2 is already difficult I don't want to know how much effort it going to take for http3 which I think is allooot more complicated than http2. Can't the developers who did the http2 for nginx give some hint or clues what the best way forward is to implement this in unit?

https://github.com/nginx/unit/issues/554

gertcuykens avatar Jul 25 '21 20:07 gertcuykens

@gertcuykens

why not nginx proxy pass it directly to your native app service instead of unit?

Anyway you need some software to be responsible for running, monitoring, scaling that service and maintaining connections: PHP-FPM, Gunicorn, Unicorn... or that can be Unit.

Unit isn't just an app server. It's a multi-purpose web-server, that is able to proxy, serve static media, and finally run apps. For example, you can use Unit just to serve static files and that's perfectly fine. You don't need proxy in front of it unless you need some features that are currently missing.

I am also having a hard time understanding why large portions of the nginx code base can't be used for http2?

Because Unit has completely different architecture and incompatible with nginx internal APIs in almost all aspects. There's just no such large portion that can be taken from nginx and reused saving some significant effort for the implementation.

It just worries me a bit that it takes so long to implement http2

It doesn't take so long to implement. It's still not implemented because nobody is working on it, as we have other tasks with higher priorities and all dev resources are busy with that work.

VBart avatar Jul 30 '21 16:07 VBart

only the absence of http2 prevents the transfer of projects from nginx to nginx-unit. Have you got some news?

mercurykd avatar Nov 08 '22 18:11 mercurykd

HTTP/2 and gRPC support is still on the wish list, but not currently planned.

lcrilly avatar Nov 24 '22 09:11 lcrilly

Up. Looking forward for http/2 =)

lone-cat avatar Dec 05 '22 10:12 lone-cat