Azure Front Door(二)对后端 VM 进行负载均衡

  上一篇我们讲到通过 Azure Front Door 为我们的 Azure App Service 提供流量转发,而整个 Azure Front Door 在添加后端池的时候可选的后端类型是支持多种Azure Service,如下图所示:

Azure Front Door(二)对后端 VM 进行负载均衡

目标类型可为:

1,App Service(应用服务)

2,Cloud Service(云服务)

3,Storage(存储)

4,Storage(存储空间(经典))

5,Application Gateway(应用程序网关)

6,API Management(API 管理)

7,Public IP Address(公共 IP 地址)

8,Traffic Manager(流量管理器)

9,Customer host(自定义主机)

  我们今天要演示的是目标类型为 “Public IP Address”,将流量转发到后端绑定的公共 IP 上。

-------------------- 我是分割线 --------------------

1,Azure Front Door(一)为基于.net core 开发的Azure App Service 提供流量转发 2,Azure Front Door(二)对后端 VM 进行负载均衡 二,正文 1,先创建好后端池-----Azure VM

登陆到Azure Portal 上,点击 “Create a resource”,选择 “Compute”,并且点击箭头所指的图标

Azure Front Door(二)对后端 VM 进行负载均衡

输入相关参数:

Resource group 选择创建一个新的:“Web_Test_VM_RG”

Virtual machine name:“cnbateblogweb-vm01”

Region:“(Asia Pacific) East Asia”

Image 选择:“Windows Server 2019 Datacenter-Gen1”

Size 选择:"Standard_DS1_v2 - 1 vcpu,3.5 GiB memory"

Username:“cnbateblogweb01”

Password:输入相关确定的密码

点击 “Next : Disks”

Azure Front Door(二)对后端 VM 进行负载均衡

关于 OS disk type 我们选择 “Standard HDD”

点击 “Next : Networking >”

Azure Front Door(二)对后端 VM 进行负载均衡

由于Azure 默认在创建 VM 的时候,附带创建的Public IP 的 SKU 为 “Basic”,“Assignment” 为 “Dynamic”

我们需要将 Assignment 修改为 “Static”

Azure Front Door(二)对后端 VM 进行负载均衡

修改其他相关参数

Virtual network 选择默认

Subnet 选择默认

NIC network security group 选择默认

Select inbound ports 选择默认

点击 “Review + create”,创建预校验

Azure Front Door(二)对后端 VM 进行负载均衡

我们可以看到校验成功,最后我们点击 “Create” 进行创建操作

Azure Front Door(二)对后端 VM 进行负载均衡

在等待创建 “cnbateblogweb-vm01” 的过程中,我们继续创建同样规格的 “cnbateblogweb-vm02”

Azure Front Door(二)对后端 VM 进行负载均衡

Azure Front Door(二)对后端 VM 进行负载均衡

等待片刻,我们就可以在 “Web_Test_VM_RG” 这个资源组上查看到创建好的两台虚拟机

Azure Front Door(二)对后端 VM 进行负载均衡

2,虚拟机上安装IIS服务

等待创建完成之后,我们跳转到该资源,并且尝试通过 Windows 远程控制的方式登陆到这台虚拟机上

选择 “Setting =》Connect”,点击 “Download RDP File”

Azure Front Door(二)对后端 VM 进行负载均衡

登陆成功后,我们通过 PowerShell 安装 IIS 服务

Powershell 输入以下命令

Install-WindowsFeature -name Web-Server -IncludeManagementTools

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsssdy.html