-
I hope this isn't a stupid question, but I've been seeing quite a lot of excitement over gRPC as an optimization over JSON over HTTPS for some use cases. I see that starting in aspnetcore 6.0, gRPC support was added and that it "just works" when inserted into the middleware stack just like everything else. My question is how this relates to services created using any of the brilliant shims provided in this tooling. Has anyone tried it? API Gateway REST API -> Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @lorenh, gRPC requires HTTP/2 and a persistent connection to the compute which doesn't work in Lambda which is event based. So the ASP.NET Core Lambda bridge libraries are not a good fit. In theory the .NET gRPC-Web libraries should work for non-streaming operations since that is HTTP/1.1 and the non-streaming operations don't require a persistent connection. Currently gRPC-Web is not working in my testing but it is something I would like to investigate more into seeing if we could make it work in the ASP.NET Core Lambda bridge libraries. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @lorenh, gRPC requires HTTP/2 and a persistent connection to the compute which doesn't work in Lambda which is event based. So the ASP.NET Core Lambda bridge libraries are not a good fit. In theory the .NET gRPC-Web libraries should work for non-streaming operations since that is HTTP/1.1 and the non-streaming operations don't require a persistent connection. Currently gRPC-Web is not working in my testing but it is something I would like to investigate more into seeing if we could make it work in the ASP.NET Core Lambda bridge libraries.