gpt4 book ai didi

azure - 将App Service连接到不同资源组中的负载平衡群集

转载 作者:行者123 更新时间:2023-12-03 01:23:49 25 4
gpt4 key购买 nike

我在Azure中有2个独立的资源组:

  • 包含一些服务,包括托管Python Django Django的Linux App Service。
  • 包含一个ElasticSearch集群,该集群是我使用here
  • 中的ARM模板创建的

    我想从(1)中的App服务连接到(2)中的ElasticSearch服务负载均衡器

    我试图使用创建虚拟网络对等
    az network vnet peering create -g $webResourceGroup -n web2es --vnet-name vnet --remote-vnet $remote_vnet --allow-vnet-access
    其中 $webResourceGroup => (1)$remote_vnet => (2)
    但是,当我尝试向ElasticSearch Service发出HTTP请求时,它不起作用。

    如何解决或解决此问题?

    最佳答案

    有一些requirements and constraints用于虚拟网络对等。

    Resources in one virtual network cannot communicate with the front-end IP address of a Basic internal load balancer in a globally peered virtual network. Support for Basic Load Balancer only exists within the same region. Support for Standard Load Balancer exists for both, VNet Peering and Global VNet Peering. Services that use a Basic load balancer which will not work over Global VNet Peering are documented here.



    因此,如果对等的VNet位于不同的区域,则无法通过负载均衡器的前端IP连接到 Basic负载均衡器后面的资源。 Standard负载均衡器不存在此限制。从 parameters中,您会看到 loadBalancerInternalSkuloadBalancerExternalSku默认为 basic,您应该使用 standard负载均衡器。

    enter image description here

    另外,您应该拥有 integrated your app with an Azure Virtual Network。请注意,在使用 Regional VNet Integration时,您无法跨全局对等连接访问资源(VNet位于不同的区域),这需要应用程序且VNet必须位于同一区域。如果是这样,则需要使用 Gateway required VNet IntegrationVNet peering with gateway transit

    如果可能,您可以在同一区域中创建所有资源,例如VNet,应用程序服务,群集。这样,您就不需要VPN网关来进行VNet集成。这可能会有更少的限制,并且更容易在您的方案中进行部署。

    希望这可以对您有所帮助。

    关于azure - 将App Service连接到不同资源组中的负载平衡群集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59079481/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com