[英]Access Azure Container Instance from Azure App Service (Web App)
I've a microservice that runs on a Azure Container Instance, and a WebApp that run on App Service.我有一个在 Azure 容器实例上运行的微服务和一个在应用服务上运行的 WebApp。 I want my WebApp to call my microservice (that is private).我希望我的 WebApp 调用我的微服务(即私有的)。 I've created a virtual network (v-net) with a subnet.我创建了一个带有子网的虚拟网络 (v-net)。 But Azure says my two services cannot be on the same subnet because there are not delegated by the same resource.但是 Azure 说我的两个服务不能在同一个子网上,因为没有由同一个资源委托。 WebApp is delegated to Microsoft.Web/serverfarms and Azure Container Service is delegated to: Microsoft.ContainerInstance/containerGroups. WebApp 委托给 Microsoft.Web/serverfarms,Azure 容器服务委托给:Microsoft.ContainerInstance/containerGroups。 How can I achieve what I want?我怎样才能达到我想要的? (call the microservice from the webapp?) (从 webapp 调用微服务?)
Even though it's not exactly how you're trying to achieve, you can always use a message broker to decouple and enable the communication between 1-N microservices using a Service Bus Topic.即使这不是您想要实现的方式,您也始终可以使用消息代理来解耦并使用服务总线主题启用 1-N 微服务之间的通信。
Among the benefits:其中的好处:
You can read more about my recommended solution:您可以阅读有关我推荐的解决方案的更多信息:
https://microservices.io/patterns/communication-style/messaging.html https://microservices.io/patterns/communication-style/messaging.html
https://docs.microsoft.com/en-us/azure/architecture/microservices/design/interservice-communication https://docs.microsoft.com/en-us/azure/architecture/microservices/design/interservice-communication
https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/service-to-service-communication https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/service-to-service-communication
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.