可以使用 gRPC/gRPC-Web 在 Azure 上托管的微服务之间进行通信吗?

问题描述

我目前正在设计一个微服务架构,我对这个话题很陌生,这个问题似乎没有在任何地方明确回答。

是否可以使用 gRPC 在微服务(Azure 应用服务)之间进行通信?是否可以通过 Containers 或 Kestrel 以某种方式完成以支持 HTTP/2?

我有以下示例在本地托管时工作:

enter image description here

但是,当在 Azure 中托管它们时,它似乎不起作用:

基本上是否可以在 Azure 中使用 gRPC 或者我是否必须使用 gRPC-Web 进行所有通信? 或者有没有像 REST/SignalR 这样的推荐/替代方案?

解决方法

根据开发者的使用情况,不推荐使用gRPC。具体可以参考用户反馈和我在下面截取的一些截图。

您可以先阅读这篇文章。

SIGNALR VS GRPC ON ASP.NET CORE – WHICH ONE TO CHOOSE

当前状态:

  1. gRPC-Web for .NET now available

enter image description here

2. Azure SignalR Service(Official recommendation)

enter image description here

开发者反馈:

gRpc support in Azure App Service

图一。

enter image description here

图二。

enter image description here

图三。

enter image description here

图 4.

enter image description here