dotnet / aspnetcore Public
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
Comments
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. |
Yeah I've already built a service that's running as a generic hosted service. I've ported it to the new asp net core 3 template and got it working running on self hosted kestrel, but currently looking at hosting it behind iis and hopefully deploying it as an app service in Azure. I can't get the former (iis) to work.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Eilon Lipton <[email protected]>
Sent: Wednesday, April 3, 2019 6:06:17 PM
To: aspnet/AspNetCore
Cc: moodya; Mention
Subject: Re: [aspnet/AspNetCore] Host grpc service in iis or as an app service? (#9020)
Hi @moodya<https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9020 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AlUvPONL4H1tZ-pHOakDspdkXLLgThWbks5vdN-JgaJpZM4cZ2SG>.
|
I can't find any examples of how to do this, so maybe it's not supported yet
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Alain Moody <[email protected]>
Sent: Wednesday, April 3, 2019 6:11:06 PM
To: aspnet/AspNetCore; aspnet/AspNetCore
Cc: Mention
Subject: Re: [aspnet/AspNetCore] Host grpc service in iis or as an app service? (#9020)
Yeah I've already built a service that's running as a generic hosted service. I've ported it to the new asp net core 3 template and got it working running on self hosted kestrel, but currently looking at hosting it behind iis and hopefully deploying it as an app service in Azure. I can't get the former (iis) to work.
Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: Eilon Lipton <[email protected]>
Sent: Wednesday, April 3, 2019 6:06:17 PM
To: aspnet/AspNetCore
Cc: moodya; Mention
Subject: Re: [aspnet/AspNetCore] Host grpc service in iis or as an app service? (#9020)
Hi @moodya<https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9020 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AlUvPONL4H1tZ-pHOakDspdkXLLgThWbks5vdN-JgaJpZM4cZ2SG>.
|
@shirhatti - any idea on this? |
Can't host gRPC in IIS/Azure App Service. |
Thanks for the prompt response. How would you recommend hosting a grpc service in a production scenario at the moment? Also, are you aware of any timescales when a grpc service will be host-able on iis / app service?
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Sourabh Shirhatti <[email protected]>
Sent: Wednesday, April 3, 2019 7:13:23 PM
To: aspnet/AspNetCore
Cc: moodya; Mention
Subject: Re: [aspnet/AspNetCore] Host grpc service in iis or as an app service? (#9020)
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9020 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AlUvPNHH4-HhNsSAtugTw0MzzNco6c76ks5vdO9DgaJpZM4cZ2SG>.
|
The recommended approach is to host your gRPC service on AKS. As far as App Service timelines go, I'd defer to @stefsch |
Thanks for getting back to me. In terms of aks Vs service fabric in terms of hosting the grpc service is aks the better choice? If so, why?
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Sourabh Shirhatti <[email protected]>
Sent: Monday, April 8, 2019 7:31:45 AM
To: aspnet/AspNetCore
Cc: moodya; Mention
Subject: Re: [aspnet/AspNetCore] Host grpc service in iis or as an app service? (#9020)
The recommended approach is to host your gRPC service on AKS.
As far as App Service timelines go, I'd defer to @stefsch<https://github.com/stefsch>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9020 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AlUvPLwQW8HCp-YXsz6yNaK_RH7jbZzWks5veuJRgaJpZM4cZ2SG>.
|
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) : |
As per messages above don't think iis supports hosting a grpc service
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: alustrement <[email protected]>
Sent: Thursday, April 25, 2019 10:57:42 AM
To: aspnet/AspNetCore
Cc: moodya; Mention
Subject: Re: [aspnet/AspNetCore] Host grpc service in iis or as an app service? (#9020)
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...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9020 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJKS6PEAJ2UKKH2QIKNTCZDPSF6BNANCNFSM4HDHMSDA>.
|
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. |
According to do the Microsoft guys in the messages above iis doesn't support the trailing headers required to host a grpc service. This means you can't host one in iis or as an app service at the moment.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: alustrement <[email protected]>
Sent: Thursday, April 25, 2019 11:39:08 AM
To: aspnet/AspNetCore
Cc: moodya; Mention
Subject: Re: [aspnet/AspNetCore] Host grpc service in iis or as an app service? (#9020)
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9020 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJKS6PBQO4427EYN67SI7A3PSGC4ZANCNFSM4HDHMSDA>.
|
Thanks, I missed it and it makes sense with my issue. |
We (IIS) are currently evaluating whether to support HTTP response trailers. No roadmaps/commitments I can speak to yet. |
@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. |
I fully agree with @jbrantly. gRPC is advertised as one of the main features of .NET Core 3. |
I also agree.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Tomasz Jagusz <[email protected]>
Sent: Friday, April 26, 2019 9:42:58 AM
To: aspnet/AspNetCore
Cc: moodya; Mention
Subject: Re: [aspnet/AspNetCore] Host grpc service in iis or as an app service? (#9020)
I fully agree with @jbrantly<https://github.com/jbrantly>. gRPC is advertised as one of the main features of .NET Core 3.
It should be hostable in IIS/Azure App Services.
@shirhatti<https://github.com/shirhatti> please consider adding this to the roadmap
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9020 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJKS6PENWT46GCJ7GQGEGPTPSK6BFANCNFSM4HDHMSDA>.
|
I couldn't agree more. |
We're looking into it. It requires both Windows kernel changes and IIS changes. |
@davidfowl will this be possible when .NET Core 3 is released? |
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 :( |
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). |
I roughly lost about 3 days... thanks iis |
Hi @davidfowl |
@davidfowl any chance this might get added before .NET Core 3.0 gets released? Or should we wait for 3.1 or 5.0? |
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 |
And container apps would be more expensive than app services?
…On Wed, 3 Nov. 2021, 4:25 pm David Fowler, ***@***.***> wrote:
I'll write here what I wrote on the other issue
The .NET team doesn't control when Azure gets updates. People are aware
and are working on the problem. We leave this issue open so that people can
find information on what others have done in the mean time. When app
service supports gRPC, it'll be announced on the app service blog, not on
this issue (though we'll point to the blog post on this issue).
Azure container apps (just announced today)
<https://azure.microsoft.com/en-us/services/container-apps/>, should work
with gRPC though. I'm not saying it's "The officially recommended way to
host gRPC services" but its another option to try out, if you're looking to
host a gRPC service on azure.
#9020 (comment)
<#9020 (comment)>
is still pretty accurate WRT hosting gRPC services on Azure.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9020 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCSC7K7TJCHUZ555SNWVPDUKDIXJANCNFSM4HDHMSDA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Not necessarily. It's a different model (serverless) so depending on your app and its usage pattern it could be cheaper, or it could be more expensive. Running an app continuously is roughly comparable to an S1 App Plan. But then it can get cheaper with idle pricing or by scaling down to zero when it's not doing work. If it's intermittent work it could be dead cheap, even free. |
Oner more question. Adding grpc-web to the grpc project as shown here https://docs.microsoft.com/en-us/aspnet/core/grpc/browser?view=aspnetcore-5.0 titled "Use gRPC in browser apps" has no impact whatsoever on the "hosting" question. Adding grpc-web to the solution only impacts whether browser based applications can call grpc services directly, right? |
grpc web doesn't depend on HTTP/2 so it works anywhere. |
... with significantly less efficiency. But yes, the .net GRPC client implementation will fall back automatically to GRPC-Web if it can't connect fully with regular GRPC. The same is true about the Dart library as well for Flutter. Which we've leveraged to side step this issue, but it's a VERY significant impact on responsiveness and efficiency. |
I am missing something. My understanding was that first you create a grpc project (by adding the Grpc.AspNetCore NuGet package). If you want to expose the grpc project to browser applications then you add the Grpc.AspNetCore.Web package and do the proper configuration changes in the startup class. The point of adding grpc web being to expose the grpc services directly to browsers. I mentioned this because we followed the instructions described in the link above to add grpc-web to a project deployed on web apps and "still" does not work. Are we to understand that by adding grpc-web to a grpc project that alone will make it run from a web app (app services)? |
Finally, since container apps were mentioned above as now supporting grpc services I took a look on azure. To deploy a container app (preview) the options are:
It would be very beneficial if this ASPNET CORE team developed some basic documentation on creating a basic Grpc service AND deploying it to Azure. After all, most of use creating apps with ASPNET CORE technologies look at Azure as the natural hosting solution. But, as far as I can see, there is no documentation that shows how to bring together all these technologies (including hosting). |
Yes, you create a GRPC project, then add GRPC-Web and then it will work in a browser and .net client apps and dart as 2 examples will automatically fall back if http/2 isn't available or otherwise doesn't connect. It's less than ideal, but works. We did it because we were promised that this would be in production more than a year ago. We finally gave up and put it all in k8s with nginx as the RP. |
It's a different story from IIS and App Service, but it seems that Azure Container Apps announced by Ignite can be used to host gRPC. Perhaps now we should forget about IIS and App Services. |
Just took a spin of Container App to run our gRPC service. Probably doing something wrong :D
|
Have you tried it out? did it work? |
One comment up.. |
Yeah so you did not get it to work, i had hoped @takekazuomi did. |
We are now running on ACI. BUt of course container app with scaling options would be much nicer approach. now I need to dance with traffic manager to accomplish this. |
Yeah, i have worked very little with ACI, but it does not seem like something i want, but i might be forced to. |
I also was unable to get grpc running on the public app url. I opened an issue asking to clarify how grpc is supported in container apps here microsoft/azure-container-apps#38 UPDATE: Good news, was able to get GRPC running on container apps. See the linked issue for details. |
Thank you for contacting us. Due to a lack of activity on this discussion 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. This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue! |
I think this is still something that should be supported by non-container projects. No one is saying anything because there's not much more to say. It should just be done. |
Yes of course this issue can not be closed! Grpc is very important and its
ridiculous that this is still not available in app services, this is on the
road map for App Services anyway I think so it probably could be closed if
you put a reference to that?
…On Mon, Feb 14, 2022 at 3:10 PM Binderbound ***@***.***> wrote:
I think this is still something that should be supported by non-container
projects. No one is saying anything because there's not much more to say.
It should just be done.
—
Reply to this email directly, view it on GitHub
<#9020 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCSC7JY2IG574RDHNWQLADU3B6DVANCNFSM4HDHMSDA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
We can keep this open to track it. |
Awesome the performance and comms errors of Rest apps really is not up to
Grpc.
…On Mon, Feb 14, 2022 at 4:17 PM Kevin Pilch ***@***.***> wrote:
We can keep this open to track it.
—
Reply to this email directly, view it on GitHub
<#9020 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCSC7PV5VTSBIPMECE63DLU3CF6JANCNFSM4HDHMSDA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It's been 3 years since the ticket was opened and yet it's still not supported? :( |
And Azure is constantly changing I think more than any other platform, I
hope its not politics?
…On Sun, Feb 20, 2022 at 11:56 AM alansiqueira27 ***@***.***> wrote:
It's been 3 years since the ticket was opened and yet it's still not
supported? :(
—
Reply to this email directly, view it on GitHub
<#9020 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCSC7JJ3FXUVHAE4QHVQNTU4A32BANCNFSM4HDHMSDA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I've given up hope on a Windows Update for Windows Server 2019 to fix these http.sys issues in IIS. Can someone from Microsoft just tell us that IIS is dead and that trying to host gRPC on Windows (pre-2022) is futile. |
Has anyone tried hosting gRPC on IIS on Windows Server 2022?
…On Sat, Feb 19, 2022 at 10:15 PM Vince Zalamea ***@***.***> wrote:
I've given up hope on a Windows Update for Windows Server 2019 to fix
these http.sys issues in IIS. Can someone from Microsoft just tell us that
IIS is dead and that trying to host gRPC on Windows (pre-2022) is futile.
—
Reply to this email directly, view it on GitHub
<#9020 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGE3M253HXMLZZ4TQ76VDWTU4BMGLANCNFSM4HDHMSDA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
This original thread was for hosting Azure app services running gRPC wasn't
it? If you want to use gRPC any other way it should be fully supported.
The problem is that Azure IIS is customised from normal IIS versions, so I
think it's just a resource allocation problem, there is some problem with
running gRPC in Azure app services that needs to be fixed.
On Sun, Feb 20, 2022 at 2:50 PM vasquezjames ***@***.***>
wrote:
… Has anyone tried hosting gRPC on IIS on Windows Server 2022?
On Sat, Feb 19, 2022 at 10:15 PM Vince Zalamea ***@***.***>
wrote:
> I've given up hope on a Windows Update for Windows Server 2019 to fix
> these http.sys issues in IIS. Can someone from Microsoft just tell us
that
> IIS is dead and that trying to host gRPC on Windows (pre-2022) is futile.
>
> —
> Reply to this email directly, view it on GitHub
> <
#9020 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AGE3M253HXMLZZ4TQ76VDWTU4BMGLANCNFSM4HDHMSDA
>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
>
> or Android
> <
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub
>.
>
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#9020 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCSC7IIOSNUIHSIVB2VNJDU4BQIVANCNFSM4HDHMSDA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, we are doing it for the last few months in production and its works. |
Is it possible to do this? If so how?
2021/12/16 Update - @JamesNK
Azure Container Service can host gRPC services - https://techcommunity.microsoft.com/t5/apps-on-azure-blog/introducing-azure-container-apps-a-serverless-container-service/ba-p/2867265
2020/10/28 Update - @JamesNK
User voice issue
There is a Microsoft Azure user voice issue for adding gRPC support to App Service. Consider voting if this is an important feature for you.Azure no longer uses user voice.
gRPC-Web
gRPC-Web with .NET is now available. gRPC-Web is compatible with IIS and Azure App Service. Link to blog post with more info: https://devblogs.microsoft.com/aspnet/grpc-web-for-net-now-available/
IIS
IIS is supported with .NET 5 and an insiders build of Windows. More info: #9020 (comment)
The text was updated successfully, but these errors were encountered: