Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host grpc service in iis or as an app service? #9020

Open
moodya opened this issue Apr 3, 2019 · 62 comments
Open

Host grpc service in iis or as an app service? #9020

moodya opened this issue Apr 3, 2019 · 62 comments
Labels

Comments

@moodya
Copy link

@moodya moodya commented Apr 3, 2019

Is it possible to do this? If so how?

@moodya moodya changed the title Host grpc service in iis? Host grpc service in iis or as an app service? Apr 3, 2019
@Eilon Eilon added the area-grpc label Apr 3, 2019
@Eilon

This comment has been minimized.

Copy link
Member

@Eilon Eilon commented Apr 3, 2019

Hi @moodya , have you checked out the docs at https://docs.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start?view=aspnetcore-3.0&tabs=visual-studio ?

If you're running into a problem, please let us know and we can investigate.

@Eilon Eilon added the question label Apr 3, 2019
@moodya

This comment has been minimized.

Copy link
Author

@moodya moodya commented Apr 3, 2019

@moodya

This comment has been minimized.

Copy link
Author

@moodya moodya commented Apr 3, 2019

@Eilon

This comment has been minimized.

Copy link
Member

@Eilon Eilon commented Apr 3, 2019

@shirhatti - any idea on this?

@shirhatti

This comment has been minimized.

Copy link
Member

@shirhatti shirhatti commented Apr 3, 2019

Can't host gRPC in IIS/Azure App Service.
The HTTP/2 implementation of Http.Sys does not support HTTP response trailing headers which gRPC relies on.

@JamesNK JamesNK added this to the Discussions milestone Apr 3, 2019
@moodya

This comment has been minimized.

Copy link
Author

@moodya moodya commented Apr 4, 2019

@shirhatti

This comment has been minimized.

Copy link
Member

@shirhatti shirhatti commented Apr 8, 2019

The recommended approach is to host your gRPC service on AKS.

As far as App Service timelines go, I'd defer to @stefsch

@moodya

This comment has been minimized.

Copy link
Author

@moodya moodya commented Apr 8, 2019

@alustrement

This comment has been minimized.

Copy link

@alustrement alustrement commented Apr 25, 2019

I'm currently expecting issues to do this. I got a gRPC service running well using aspnetcore 3 preview 3 and Kestrel. But, an error about trailers appears using IIS when the service send the response (the request is well received) :
gPRC error => 2 UNKNOWN: No status received)
Dotnet error => "Trailers are not supported for this response" in Microsoft.AspNetCore.Http.ResponseTrailerExtensions.AppendTrailer(HttpResponse response, String trailerName, StringValues trailerValues) at Grpc.AspNetCore.Server.Internal.HttpResponseExtensions.ConsolidateTrailers...

@moodya

This comment has been minimized.

Copy link
Author

@moodya moodya commented Apr 25, 2019

@alustrement

This comment has been minimized.

Copy link

@alustrement alustrement commented Apr 25, 2019

Following this exchange https://forums.iis.net/p/1241598/2147837.aspx?p=True&t=636917571046786374, it seems that is not the responsibilty of the web server to handle gRPC. gPRC use HTTP/2, IIS supports HTTP/2, so it must works. If it's not, it's a bug from IIS or, more possible, from dotnetcore.

@moodya

This comment has been minimized.

Copy link
Author

@moodya moodya commented Apr 25, 2019

@alustrement

This comment has been minimized.

Copy link

@alustrement alustrement commented Apr 25, 2019

Thanks, I missed it and it makes sense with my issue.
@shirhatti the support is planned on the roadmap ?

@shirhatti

This comment has been minimized.

Copy link
Member

@shirhatti shirhatti commented Apr 25, 2019

We (IIS) are currently evaluating whether to support HTTP response trailers. No roadmaps/commitments I can speak to yet.

@jbrantly

This comment has been minimized.

Copy link

@jbrantly jbrantly commented Apr 25, 2019

@shirhatti Given gRPC seems to be a major feature of .NET Core 3 (https://github.com/grpc/grpc-dotnet), it would be a real shame if it's not hostable in IIS/App Service given so many .NET web applications are hosted on those. I hope the availability of that feature in .NET Core helps drive your roadmap.

@Misiu

This comment has been minimized.

Copy link

@Misiu Misiu commented Apr 26, 2019

I fully agree with @jbrantly. gRPC is advertised as one of the main features of .NET Core 3.
It should be hostable in IIS/Azure App Services.
@shirhatti please consider adding this to the roadmap

@moodya

This comment has been minimized.

Copy link
Author

@moodya moodya commented Apr 26, 2019

@aloisdeniel

This comment has been minimized.

Copy link

@aloisdeniel aloisdeniel commented Apr 26, 2019

I couldn't agree more.

@davidfowl

This comment has been minimized.

Copy link
Member

@davidfowl davidfowl commented Apr 26, 2019

We're looking into it. It requires both Windows kernel changes and IIS changes.

@Misiu

This comment has been minimized.

Copy link

@Misiu Misiu commented May 22, 2019

@davidfowl will this be possible when .NET Core 3 is released?
Ability to host GRPC in App Services is a blocker for me.

@vasquezjames

This comment has been minimized.

Copy link

@vasquezjames vasquezjames commented May 29, 2019

Well is May 29 of 2019, and yet there is not signal that this will be possible. I'm looking for host a GRPC service in IIS and add a certificate to use HTTPS :(

@davidfowl

This comment has been minimized.

Copy link
Member

@davidfowl davidfowl commented May 29, 2019

No it's not possible on IIS, we're working on getting changes but it will be a slow process (as it requires a windows update).

@anisite

This comment has been minimized.

Copy link

@anisite anisite commented Jun 5, 2019

I roughly lost about 3 days... thanks iis

@Ahmad-Magdy

This comment has been minimized.

Copy link

@Ahmad-Magdy Ahmad-Magdy commented Jul 25, 2019

Hi @davidfowl
Any update?

@Misiu

This comment has been minimized.

Copy link

@Misiu Misiu commented Aug 14, 2019

@davidfowl any chance this might get added before .NET Core 3.0 gets released? Or should we wait for 3.1 or 5.0?

@davidfowl

This comment has been minimized.

Copy link
Member

@davidfowl davidfowl commented Aug 14, 2019

No as it requires windows changes. It’s not going to be part of 3.0 and it will require the latest version of Windows (whatever that is at the time) to get these features. There’s no ETA

@rupeshtech

This comment has been minimized.

Copy link

@rupeshtech rupeshtech commented Oct 7, 2019

I have created step by step guide to create test and deploy grpc service using .NET Core 3.0
https://github.com/rupeshtech/k8s-grpc-dotntecore

@ikemtz

This comment has been minimized.

Copy link

@ikemtz ikemtz commented Oct 11, 2019

I just looked into this issue, so I haven't tried anything yet; but has anyone tried using Azure Web App for (Container https://azure.microsoft.com/en-us/services/app-service/containers/)?

I'm running a bunch of docker based microservices on Azure App Services and have had very little issues and have allowed me to work around other limiting characteristics of the OOB App Service offering.

@thestamp

This comment has been minimized.

Copy link

@thestamp thestamp commented Oct 15, 2019

@ikemtz gRPC works when using kestral (ie: when running in containers).

@rupeshtech Thank you, but your article is not related to the issue.

This issue is for hosting gRPC (or any app using trailing headers) in IIS or Azure App Service.

@thestamp

This comment has been minimized.

Copy link

@thestamp thestamp commented Oct 15, 2019

Would be nice if this was a big bold warning on the docs...

aspnet/AspNetCore.Docs#14684

This is now implemented.

@searus

This comment has been minimized.

Copy link

@searus searus commented Oct 16, 2019

@ikemtz I've attempted to run a basic test for using gRPC in a Linux container running in a Azure Web App for Containers and it wouldn't work for me. Couldn't find any errors reported anywhere, but the container wouldn't even respond to HTTP pings.
It's a shame. I'm not prepared to move to AKS just to get this functionality, so I guess I'll stick with good old fashioned HTTP services for now.

@GoranHalvarsson

This comment has been minimized.

Copy link

@GoranHalvarsson GoranHalvarsson commented Oct 16, 2019

@searus if you use a virtual machine instead(running in azure)

@searus

This comment has been minimized.

Copy link

@searus searus commented Oct 16, 2019

@GoranHalvarsson I'm not prepeared to move from PaaS to IaaS just to make use of this technology. I'll just wait until Azure App Service can support this.

@rizamarhaban

This comment has been minimized.

Copy link

@rizamarhaban rizamarhaban commented Oct 17, 2019

@davidfowl Any roadmap on this?

@ikcore

This comment has been minimized.

Copy link

@ikcore ikcore commented Oct 17, 2019

@mjtpena

This comment has been minimized.

Copy link

@mjtpena mjtpena commented Oct 20, 2019

With this, Azure Functions and anything else that sits on top of App Service can't really use gRPC and HTTP/2. A timeline would be nice, even for private/public previews.

@davidfowl

This comment has been minimized.

Copy link
Member

@davidfowl davidfowl commented Oct 21, 2019

We’re currently working on the changes in http.sys. After that we need to react to those changes in IIS and ARR. Then we need to update the version of Windows running in app service to take advantage of those changes in IIS.

Work has stated but it’s really hard to estimate how long it’ll take for customers to get it. We’ll keep you posted as things progress.

@ronnyek

This comment has been minimized.

Copy link

@ronnyek ronnyek commented Oct 23, 2019

I feel like this is something I'm sadly not surprised about (that implementing new http functionality requires kernel updates). Obviously IIS doesn't exist on Linux / macosx but I'd be surprised if adding support for grpc to other we servers for other operating systems... need much in the way of kernel updatea.

Maybe this is a decent argument/example for decoupling... Just saying

@ikcore

This comment has been minimized.

Copy link

@ikcore ikcore commented Oct 23, 2019

I feel like this is something I'm sadly not surprised about (that implementing new http functionality requires kernel updates). Obviously IIS doesn't exist on Linux / macosx but I'd be surprised if adding support for grpc to other we servers for other operating systems... need much in the way of kernel updatea.

Maybe this is a decent argument/example for decoupling... Just saying

I agree. This probably something to do with IIS running some low level protocal that's tied directly too the kernal. It does seem strange but at least we've got confirmation this is being worked on and that adopting isn't completely blue sky.

@davidfowl

This comment has been minimized.

Copy link
Member

@davidfowl davidfowl commented Oct 23, 2019

Remember when you had to upgrade to Windows 8 to get WebSocket support? I do too 😄

@PtwHub

This comment has been minimized.

Copy link

@PtwHub PtwHub commented Oct 25, 2019

Yes, we remember! Here is the scoop: gRPC is released in .NET-Core and we use Azure App Services so it is important to have some option, at least to test, ASAP. Can anyone tell us when this sync to the released .NET-Core capabilities will happen in Azure App Services? Or a feasible workaround. Thanks

@msftbot

This comment has been minimized.

Copy link

@msftbot msftbot bot commented Dec 7, 2019

Thank you for contacting us. Due to no activity on this issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

@msftbot msftbot bot closed this Dec 7, 2019
@msftbot msftbot bot locked as resolved and limited conversation to collaborators Dec 7, 2019
@davidfowl

This comment has been minimized.

Copy link
Member

@davidfowl davidfowl commented Dec 7, 2019

@anurse how do we keep this issue open?

@anurse anurse removed the question label Dec 7, 2019
@anurse anurse reopened this Dec 7, 2019
@anurse anurse removed this from the Discussions milestone Dec 7, 2019
@anurse

This comment has been minimized.

Copy link
Member

@anurse anurse commented Dec 7, 2019

It got put in Discussions and tagged question. Reopened.

@aspnet aspnet unlocked this conversation Dec 7, 2019
@DapperMickie

This comment has been minimized.

Copy link

@DapperMickie DapperMickie commented Dec 10, 2019

Is there any ETA on this yet?

Are there any viable alternatives to get gRPC working in a production environment?
I've looked at some stuff and it seems like hosting it on AKS is an option, I just want to make sure that we're not doing stuff that will not help us solve our problem.

We've currently been trying to get some kind of production environment running for these project:
IdentityServer project that talks to an API over gRPC
5 web portals that talk to an API over gRPC
The API that talks to a Discord Bot (ASP.NET Core) over gRPC.

We tried hosting them on a VPS but I don't know if we can actually host them in a production environment by just using kestrel if we want all of these applications to live on the same VPS.

Does anyone have an option for us so we can have multiple domains (1 domain, the rest are sub domains) with 1 IP address on 1 VPS runnning all the projects by only using Kestrel (because of the limitations in IIS, Http.Sys, windows).

(Or any other method that will enable us to host all of this ASAP)

Thanks in advance!

(EDIT)

We use Let's Encrypt ( https://github.com/natemcmaster/LetsEncrypt ) to get an SSL certificate

(EDIT 2)
We also tried contacting @davidfowl about this on twitter
https://twitter.com/DapperDino4/status/1204119195765682177 and
https://twitter.com/DapperDino4/status/1204119695344971778

@anurse

This comment has been minimized.

Copy link
Member

@anurse anurse commented Dec 11, 2019

Is there any ETA on this yet?

Adding @shirhatti and @Tratcher who have been working on this.

The timing of this is tricky to pin down right now. IIS is a Windows component, and depends upon http.sys, which is also a Windows component. Neither IIS, nor http.sys have sufficient HTTP/2 features to support gRPC. We have been working very closely with those teams to get the changes in, and they are all well on track for an upcoming release but won't be available until a Windows Server release with the appropriate changes goes live.

@Tratcher

This comment has been minimized.

Copy link
Member

@Tratcher Tratcher commented Dec 11, 2019

@JamesNK can you speak to the availability of alternatives like gRPC-web?

@JamesNK

This comment has been minimized.

Copy link
Member

@JamesNK JamesNK commented Dec 12, 2019

Context for people who don't know what gRPC-Web is: https://grpc.io/blog/state-of-grpc-web/. Because it uses HTTP/1.1, the Azure App Service restrictions won't apply to it. The downside is no HTTP/2 benefits (multiplexing, header compression), and no client or bidirectional streaming.

The gRPC-Web envoy reverse proxy is available now, but that's not easy to setup. And there is no .NET gRPC-Web client.

The ASP.NET Core team hasn't decided yet whether we're going to commit to support gRPC-Web officially. I'm looking at gRPC-Web now, and what it could look like in .NET Core. In a couple of weeks I can say more, and perhaps have an experimental preview for people to try out in January.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.