dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.38k stars 9.99k forks source link

HTTP/2 #4782

Closed ThatRendle closed 5 years ago

ThatRendle commented 9 years ago

Are there any immediate plans to add HTTP/2 support?

davidfowl commented 9 years ago

Nope

ThatRendle commented 9 years ago

Right, I might have a go at that, then.

davidfowl commented 9 years ago

Can't this just be built as middleware on top of the opaque stream feature? /cc @lodejard @Tratcher

davidfowl commented 9 years ago

Also see https://github.com/MSOpenTech/http2-katana/tree/master/src/Microsoft.Http2.Owin.Server

Tratcher commented 9 years ago

Yes, you should be able to build it as middleware using an opaque upgrade like WebSockets.

ThatRendle commented 9 years ago

Well, sounds like this should be a cakewalk. I'll get drunk and do it at the weekend 😎

Cuddlefluff commented 8 years ago

Any status on this drunken experiment?

guardrex commented 8 years ago

:+1:

michalstepien commented 8 years ago

+1

otabekgb commented 8 years ago

+1

qin-nz commented 8 years ago

+1

YangliAtGitHub commented 8 years ago

+1

nawfalhasan commented 8 years ago

+1

glen-84 commented 8 years ago

@nawfalhasan You can use reactions now, instead of +1 comments.

jphellemons commented 8 years ago

Still no Http/2 support in 2016? Because according to this article https://gooroo.io/GoorooTHINK/Article/16623/One-Weird-Trick-To-Improve-Web-Performance/21564#.Vx9o5UdkldB it will be faster with TLS too. Edit: sorry, just noticed it is on the backlog...

Tratcher commented 8 years ago

It's not on the roadmap for v1.0. However, IIS does support it on Win10 so you get most of the benefits when running Kestrel behind IIS. WebListener also supports it.

guardrex commented 8 years ago

From: HTTP/2 on IIS, David So's Blog 9/11/2015 ...

On the server, IIS running on Windows 10 or previews of Server 2016 supports HTTP/2. IIS currently supports HTTP/2 only over TLS. When making an HTTPS connection to a web server running IIS on Windows 10, HTTP/2 is used if the client and server both support it. In IIS, we’ve implemented HTTP/2 as transparently as possible – you shouldn’t need to change anything in your application for HTTP/2 to work. Certain HTTP/1.1 optimizations (domain sharding, inlining, etc.) are no longer recommended in HTTP/2, though, so you should plan to remove these in the future.

Excellent! :+1:

guardrex commented 8 years ago

Just to follow-up on the TLS bit (see "Note 2"): http://caniuse.com/#feat=http2

It looks like browsers are still only implementing HTTP/2 for TLS connections.

benaadams commented 8 years ago

Added item for AspNetCoreModule supporting http/2 PushPromises https://github.com/aspnet/IISIntegration/issues/160

0xfffffff7 commented 8 years ago

what is current status?

davidfowl commented 8 years ago

It's not happening for 1.0. We'll update the roadmap once we ship and have planned this feature out.

0xfffffff7 commented 8 years ago

thanks!

ThatRendle commented 8 years ago

If you're running on Linux, reverse-proxy behind Nginx and turn caching on to get full HTTP/2 goodness for your static contents.

Tratcher commented 8 years ago

Note this is blocked by SslStream support for ALPN: https://github.com/dotnet/corefx/issues/4721

brgrz commented 8 years ago

any update when this will be avalaible in Kestrel and if it will work on Kestrel on Windows 2012 (R2)?

davidfowl commented 8 years ago

Not until next year

DemiMarie commented 8 years ago

It seems rather pointless as long as Kestrel is still expected to run behind a reverse proxy like NGINX or IIS, which both support HTTP2 (and TLS termination).

davidfowl commented 8 years ago

You can imagine using http2 to do server to server communication (ala grpc or just REST over http2).

Cuddlefluff commented 8 years ago

It's only pointless for one scenario; Kestrel is a pure API server, will only serve short simple single-bounded requests and behind a reverse proxy. Any other scenario, HTTP2 will be useful. It would also be useful if you intend to use Kestrel as a reverse-proxy, which I think would be kind of cool.

ForNeVeR commented 8 years ago

Even if you're going to use Kestrel behind reverse-proxy, some HTTP/2 features like server push should still be useful if Kestrel support HTTP/2.

acornies commented 7 years ago

+1 for Kestrel support of HTTP/2 for things like server push.

vtortola commented 7 years ago

+1

hismichael commented 7 years ago

HTTP/2 support shall make .NET Core superior to other cross-platform technologies. +1

rh78 commented 7 years ago

+1

thewavelength commented 7 years ago

+1

AjmalVh commented 7 years ago

👍

pehadavid commented 7 years ago

+1

lolwhatitis commented 7 years ago

+1 billion. I'm looking to build a reverse proxy PoC that involves Kestrel (and nothing else), and HTTP/2 support would be excellent.

Matthias247 commented 7 years ago

Hi everyone, I did an implementation of a webserver independent HTTP/2 library for .NET over the last weeks. It's not fully done, but you can find the current status here: https://github.com/Matthias247/http2dotnet The current state should be good enough to do an experimental integration with ASP.NET Core and maybe also Kestrel.

What needs to be done is

If anybody wants to take a look or play around with it I would appreciate it. I'm open for any constructive feedback and API changes to make this even more usable.

cesarblum commented 7 years ago

The requirement for using it with a browser would however a ALPN negotiated SSL stream.

This is our main blocker for HTTP/2: we don't have one right now.

figuerres commented 7 years ago

I am for sure interested in http/2 for this and it seems like all http/2 will be over secure sockets from what i have been seeing.

jgowdy commented 7 years ago

👍

Drawaes commented 7 years ago

The api review to add alpn to sslstream was rejected. Getting an SSLStream replacement anywhere near the. Net code base is fraught with hurdles. However in saying that the Kestrel branch is looking at having a "protocol" that could certainly be set by a lower filter so say http2. It would be good to understand if MS want to continue with SSLStream on the server or something more fit for server based TLS connections

figuerres commented 7 years ago

"The api review to add alpn to sslstream was rejected. Getting an SSLStream replacement anywhere near the. Net code base is fraught with hurdles. However in saying that the Kestrel branch is looking at having a "protocol" that could certainly be set by a lower filter so say http2. It would be good to understand if MS want to continue with SSLStream on the server or something more fit for server based TLS connections"

i guess the real question is this: what is the point of having microsoft write a web server that is not supporting the next version of the web ?

I hear that Kestrel is really fast, that you should use it with the new .net stuff.... but then it looks like it can't really be much used for a real production system if it going to need to be hosted by iis and will not run http/2.

why bother ? just fix IIS to run http/2 and be done with it. or build a new server that runs http/2 and runs on azure w/o IIS and let's move on.

time i guess to see if there is a good linux http/2 server i can run ..... one less reason for having windows servers .....

MartinJohns commented 7 years ago

I hear that Kestrel is really fast, that you should use it with the new .net stuff.... but then it looks like it can't really be much used for a real production system if it going to need to be hosted by iis and will not run http/2.

It's always suggested to run Kestrel behind an nginx anyway, and nginx supports HTTP 2 just fine.

benaadams commented 7 years ago

just fix IIS to run http/2 and be done with it.

IIS/10.0 (Windows server 2016) runs http/2 happily and will use http/2 and then dispatch to Kestrel; which will be localhost so very low latency.

Drawaes commented 7 years ago

True but it makes it much less valuable to make kestrel "internet" facing with no support for this.

figuerres commented 7 years ago

@benaadams and i am lost on this.... why have a server talking to a server to be a server ??? seems like buying a car just to carry a car why buy two cars ??

the only thing i see is this thing about nhow fast it is but it still needs IIS ? less hassle then to just use iis and forget the extra server.

Drawaes commented 7 years ago

To be fair this is very common for external facing. HA_Proxy ngnix iis WebSphere are often used to front public facing sites and terminate external connections.

Drawaes commented 7 years ago

But that doesn't preclude using http2 on a server. We have many internal applications this would be of benefit to.