简体   繁体   English

Azure负载平衡器A记录

[英]Azure load balancer A record

I need an advice re Azure load balancer. 我需要有关Azure负载平衡器的建议。 First of all current status 首先当前状态

  • We have a virtual machine with IIS7 which runs 10 different websites. 我们有一个带有IIS7的虚拟机,它可以运行10个不同的网站。 We use godaddy for domain management. 我们使用godaddy进行域名管理。 Each of urls are pointed to the virtual machine IP address via A record. 每个URL都通过A记录指向虚拟机IP地址。

Future plans 未来的计划

We want to make our websites more robust by adding one more virtual machine which will be a backup if something goes wrong with the main machine. 我们希望通过添加一个虚拟机来增强我们的网站的健壮性,如果主机出现问题,它将作为备份。 Literally we are planing to keep second machine shut down and run it only if the main machine goes off (for any reason). 从字面上看,我们计划保持关闭第二台计算机并仅在主机关闭(出于任何原因)时运行它。

I'm thinking to achieve this via Azure load balancer. 我正在考虑通过Azure负载平衡器实现这一目标。 I founded a few tutorials which explain creating load balancer but haven't managed to find any info how to point existing url to load balancer. 我创建了一些教程,这些教程介绍了如何创建负载均衡器,但是还没有找到任何有关如何将现有网址指向负载均衡器的信息。

Or to re phrase my question which IP address will the load balancer have? 还是要表达我的问题,负载均衡器将拥有哪个IP地址? The main virtual machine or? 主虚拟机还是?

Thanks 谢谢

If you check your Virtual Machine you will see there's a cloud service associated with it. 如果检查您的虚拟机,您将看到与之关联的云服务。 The cloud service is the one renponsible to provide public ip addresses, hostname, auto scale, load-balance to endpoints and a series of other functionalities to one VM or a set of VMs. 云服务是负责向一个VM或一组VM提供公共IP地址,主机名,自动扩展,负载均衡到端点以及一系列其他功能的服务。

What enables or disables the load balance of your cloud service is something called load-balanced set for endpoints. 启用或禁用云服务的负载平衡的是称为端点的负载平衡集。 You can have a single endpoint for a VM or a load-balanced set to distribute a specific type of traffic between multiple virtual machines or services. 您可以为VM或负载平衡集设置一个端点,以在多个虚拟机或服务之间分配特定类型的流量。 Check the guide below to find out how to setup: 查看以下指南,了解如何设置:

Configure a load-balanced set 配置负载平衡集

Basically what you want is to create a new VM and add it to the same cloud service as the one you have running today. 基本上,您想要创建一个新的VM,并将其添加到与您今天运行的VM相同的云服务中。 Don't use quick create, use custom create otherwise you will not have the option to select the cloud service. 不要使用快速创建,请使用自定义创建,否则您将无法选择云服务。 The second step will be creating a load-balance set for all the endpoints you need both vms to answer. 第二步是为两个虚拟机都需要回答的所有端点创建一个负载平衡集。 For example, creating a load-balanced set for port 80 would make the incoming requests to be balanced (round-robin) between your 2 vms. 例如,为端口80创建负载平衡集将使传入的请求在2个虚拟机之间达到平衡(循环)。

The VIP of all the VMs in the same cloud service will be the same. 同一云服务中所有VM的VIP都将相同。 You won't have to change anything on your public DNS server. 您无需在公共DNS服务器上进行任何更改。

更新到Azure负载均衡器文档的链接: https : //azure.microsoft.com/zh-cn/documentation/articles/load-balancer-overview/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM