0

我正在尝试创建一个负载平衡器来坐在我的两台网络机器前面,尽管我对这个屏幕感到困惑(见附件)。我不确定在“公共 IP 地址”字段中输入什么?如果是IP,那么我从哪里获得价值?

非常感谢

Azure 负载均衡器向导 Azure 负载均衡器

4

2 回答 2

0

如果您创建公共类型的负载均衡器,您需要创建一个新的公共 IP 地址或使用现有的公共 IP 地址,以便您可以通过面向公共的 IP 地址作为前端配置访问后端虚拟机。在这里,您只需要命名一个公共 IP,例如 Load balancer-pip 并输入“公共 IP 地址”字段。

此外,如果要将两台单独的机器(不在可用性集或规模集中)添加为后端池,则需要创建负载均衡器的标准 SKU,因为标准 LB 与虚拟网络完全集成,您可以将任何虚拟机(具有标准 SKU 公共 IP 或没有公共 IP)放在单个虚拟网络中作为后端池端点,而基本负载均衡器仅支持单个虚拟机或单个可用性集或虚拟机规模集中的虚拟机.

如果两台 Web 计算机位于现有可用性集或规模集中,则可以选择基本 SKU 负载均衡器。

有关详细信息,您可以查看Azure 负载均衡器

于 2018-11-07T13:07:06.153 回答
0

看看那里提供的屏幕截图。您正在免费试用并正在试用 Azure 负载均衡器。

我们有 2 个 SKU:基本标准

由于您正在寻找 ELB(外部/公共负载均衡器),因此您应该选择使用标准。然后,公共 IP 以及后端 VM 需要有一个标准 IP。

因此,我建议如下: 注意:假设您没有用尽从 Azure 获得的 5 个免费公共 IP。

第 1 步:将您的网络服务器部署到“可用性集”中 第 2 步:使用公共 IP 地址部署基本 SKU 永久负载均衡器 首选使其静态。第 3 步:根据需要在您的网站绑定的必要端口(443/80)上创建负载平衡规则 - 您也可以选择完成 PAT(端口地址转换) - 您还可以在提供粘性的关联/元组之间进行测试会话按客户端 IP > 客户端 IP 和协议 > 默认/5 元组的顺序第 4 步:最后添加后端池

Troubleshooting further: Once you have reached this point, it's safe to say you have got the configuration right! But, check the following 1. Check for NSG at the subnet level as well as the VM nic Level 2. make sure you have allowed the Azure load balancer default rule 3. Switch the probe protocol from HTTP to TCP if you application anticipates a 3-way handshake and an acknowledgment. (layer 3-4) 4. VM with Public IPs: If your VM/VMs has a public IP's then keyNote the traffic outbound would take the respective public IP. Should you want the traffic to take the Load Balancer IP for SNAT. Then, kindly remove the public IP that is set on the VM/VM's.

Effective testing: Browse your application by creating custom landing pages from a private window of a browser. Say ex; I hit VM1 - text over html header I hit VM2 - text over html header

Should you have got this working, you are good to move your test workloads and applications on to these servers.

Advanced Troubleshooting: - Here on the load balancer takes no blame as it's working as expected. - You would want to check the ports on the application servers - Public IP Time out: https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-tcp-idle-timeout

Commands: Windows CMD:

Netstat -ano | Findstr port# //replace port with the respective port number

Linux: $ netstat -tulpn | grep port# //replace port with the respective port number

Make sure that they are listening.

  • 如果你有一台 Linux 机器。确保您的 Ip 表没有阻止您可能正在使用的任何自定义端口

我希望这有帮助。

参考文档: https ://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-troubleshoot https://docs.microsoft.com/en-us/azure/load-balancer/load-平衡器分配模式

于 2018-11-11T08:47:40.717 回答