0% found this document useful (0 votes)
30 views

Create A Load Balancer With More Than One Availability Set in The Backend Pool Using The Azure Portal

Uploaded by

Sanskar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
30 views

Create A Load Balancer With More Than One Availability Set in The Backend Pool Using The Azure Portal

Uploaded by

Sanskar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 21
4125124, 741 PM Tutorial: Cre (load balancer with more than one availabilty st inthe backend pool - Azure poral -Azure Load Balancer | Micr. Tutorial: Create a load balancer with more than one availability set in the backend pool using the Azure portal Article + 10/25/2023 As part of a high availability deployment, virtual machines are often grouped into multiple availability sets. Load Balancer supports more than one availability set with virtual machines in the backend pool. In this tutorial, you learn how to: VY Create a NAT gateway for outbound connectivity Y Create a virtual network and a network security group VY Create a standard SKU Azure Load Balancer VY Create four virtual machines and two availability sets VY Add virtual machines in availabilty sets to backend pool of load balancer Y Test the load balancer Prerequisites * An Azure account with an active subscription, Create an account for free Create NAT gateway In this section, you'll create a NAT gateway for outbound internet access for resources in the virtual network. For other options for outbound rules, check out Network Address Translation (SNAT) for outbound connections 1. Sign in to the Azure portal 2. In the search box at the top of the portal, enter NAT gateway. Select NAT gateways in the search results. 3. Select + Create. nitps:eam mierosof.comlen-ustazurelload-balancertutora-mut-avallablity-sets-portal sn 4125124, 741 PM Tutorial: Cre 03 fad balancer wth more han one avilbily sein te backend pol Azure poral - Azure Load Balancer Mix. 4. In the Basics tab of Create network address translation (NAT) gateway enter or select the following information: {Expand table Setting Value Project details Subscription Select your subscription Resource group Select Create new Enter load-balancer-rg in Name. Select OK. Instance details NAT gateway name Enter Ib-nat-gateway. Region Select East US. Availability zone Select None, Idle timeout (minutes) Enter 15. nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal 221 1125128, 7-41 PM i ee+ HODeases ee e cer | Mic. Home > NAT gateways Create network address translation (NAT) gateway x poure NAT gateray canbe ued to arate uous rom ait eto tothe pubic inert Project deta Sect subcption to mange depioyed resources and core Use resource rau ike oles to agate nc manage 3 sutton [peesascpin ascurce group * (rea tae bance rg = Instance des argatenay name * feson* ea = sat oie © 5. Select the Outbound IP tab or select the Next: Outbound IP button at the bottom of the page. 6. Select Create a new public IP address under Public IP addresses. 7. Enter nat-gw-public-ip in Name in Add a public IP address. 8. Select OK. 9, Select the blue Review + create button at the bottom of the page, or select the Review + create tab. 10. Select Create. Create a virtual network The following procedure creates a virtual network with a resource subnet. 1. In the portal, search for and select Virtual networks. hntps:leam mirosot.conmver-usiazureoad-alancertutoria-mult-avalally-sets-portal 3a 1125124,7-41 PM Tutorial: Creat 2 loa balancer with more than one availabiliy setin the backend pool Azure portal - Azure Load Balancer | Mir. 2. On the Virtual networks page, select + Create. 3. On the Basics tab of Create tual network, enter or select the following information: <2 Expand table Setting Value Project details Subscription Select your subscription, Resource group Select Create new. Enter load-balancer-rg in Name. Select OK, Instance details Name Enter Ib-vnet. Region Select East US. nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal ani 1125128, 7-41 PM Home > Vinual networks * Create virtual network co t GE pace Security Paddrsis Tage Review terete “+ Aawe vit Netaor Ne the fundamental ule lok er your pate netor in Azure VN enables mary pes of ‘aur esoutces, such 35 ze Virtual Machies (M1 Securely Communit wth exh ote, tb erat ahd on-premises rensvts avis rare # radon natn ta os open your ou ots arta bengswth sons tenets oF Azure'sinanictie seh as sc asi and oer e Project detats © seer the subscription te menage deployed rscuces end coms, Use resource groups he folders fergie and manage all sy mrescurces a Subsptin sae tubiripcn v l ° escuce gro" (New oad ance ¥ ob temtancedetaits © wera nerorname lbenet e o “mo: (sess ¥ a 4. Select the IP addresses tab, or the Next: Security and Next: IP Addresses buttons at the bottom of the page. 5. In the address space box in Subnets, select the default subnet. 6. In Edit subnet, enter or select the following information: (© Expand table Setting Value Subnet details Subnet template Leave the default Default. Name Enter backend-subnet. hntps:leam mirosot.conmver-usiazureoad-alancertutoria-mult-avalally-sets-portal 521 1125124, 7-41 PM Tutorial: Creat 2 load balancer with more than one availabiliy sein the backend pool Azure portal - Azure Load Balancer | Mir. Setting Value Starting address Leave the default of 10.0.0.0. Subnet size Leave the default of /24(256 addresses). Security NAT Gateway Select Ib-nat-gateway. nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal 621 1125124, 741 PM Tutorial: Edit subnet x Select an address space and configure your subnet, You can customize a defeult subnet or select from subnet templates if you plan to add select services later. Learn more c IP address space @ Subnet details Subnat template © Name~@ Starting address * © Subnet size @ IP address space @ ‘Security 0.0.00, 10.0.0.0- 10.0.255.255 (65536 addresses) Default v backend-subnet ] (Fone 7/24 (256 addresses) v| 10.0.0 - 100.0255 (256 addresses) Simplify internet access for virtual machines by using a network address translation gateway. Filter subnet traffic using 2 network security group. Learn more © NAT gateway © Network security group © Route table 7. Select Save. b-nat-gateway v create new None v Create new None v 8. Select Review + create at the bottom of the screen, and when validation passes, select Create. hntps:leam mirosot.conmver-usiazureoad-alancertutoria-mult-avalally-sets-portal ‘2 load balancer with more than one availtiliy set the backend pool -Azure portal - Azure Load Balancer| Mic. man 1125124,7-41 PM Tutorial: Creat 2 loa balancer with more than one availabiliy setin the backend pool Azure portal - Azure Load Balancer | Mir. Create a network security group In this section, you'll create a network security group (NSG) for the virtual machines in the backend pool of the load balancer. The NSG will allow inbound traffic on port 80. 1. In the search box at the top of the portal, enter Network security group. 2, Select Network security groups in the search results. 3. Select + Create or Create network security group button. 4. On the Basics tab, enter or select this information: 2. Expand table Setting Value Project details Subscription Select your subscription Resource group Select Ib-resource-group. Instance details Name Enter Ib-NSG. Region Select (US) East US. 5. Select Review + create tab, or select the blue Review + create button at the bottom of the page. 6. Select Create 7. When deployment is complete, select Go to resource. 8. In the Settings section of the Ib-NSG page, select Inbound security rules. 9. Select + Add 10. In the Add inbound security rule window, enter or select the following information: © Expand table nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal ani 1125124, 7-41 PM Tutorial: Creat 2 loa balancer with more than one availabiliy sein the backend pool Azure portal - Azure Load Balancer| Mir. Setting Value Source Select Any, Source port ranges Enter * Destination Select Any, Service Select HTTP, Action Select Allow. Priority Enter 100. Name Enter Ib-NSG-HTTP-tule. 11, Select Add. Create load balancer In this section, you create a load balancer for the virtual machines. 1. In the search box at the top of the portal, enter Load balancer. Select Load balancers in the search results. 2. In the Load balancer page, select Create or the Create load balancer button. 3. In the Basics tab of the Create load balancer page, enter, or select the following information: © Expand table Setting Value Project details Subscription Select your subscription. Resource group Select lb-resource-group. Instance details Name Enter load-balancer Region Select (US) East US. nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal 91 1125124, 7-41 PM Tutorial: Creat 2 load balancer with more than one availabiliy sein the backend pool Azure portal - Azure Load Balancer | Mir. Setting Value sku Leave the default Standard. Type Select Public. Tier Leave the default Regional. 4, Select the Frontend IP configuration tab, or select the Next: Frontend IP configuration button at the bottom of the page, 5. In Frontend IP configuration, select + Add a frontend IP configuration. 6. Enter Ib-frontend-IP in Name. 7. Select IPv4 or IPv6 for the IP version. © Note IPv6 isn’t currently supported with Routing Preference or Cross-region load- balancing (Global Tier) 8, Select IP address for the IP type. © Note For more information on IP prefixes, see Azure Public IP address prefix. 9, Select Create new in Public IP address. 10. In Add a public IP address, enter Ib-public-IP for Name. 11, Select Zone-redundant in Availability zone. © Note In regions with Availability Zones, you have the option to select no zone (default option), a specific zone, or zone-redundant. The choice will depend on your specific domain failure requirements. In regions without Availability Zones, this nitps:eam mierosof.comlen-ustazurelload-balancertutora-mut-avalablity-sets-portal ro ‘v25I04, 741 PM Turis: Create fad balancer wth more than one aval set in he backend pool-Azure portal Azure Load Balancer | Mr. field won't appear. For more information on availability zones, see Availability zones overview. 12, Select OK. 13. Select Add. 14, Select the Next: Backend pools> button at the bottom of the page. 15. In the Backend pools tab, select + Add a backend pool 16. Enter Ib-backend-pool for Name in Add backend pool 17. Select Ib-VNet in Virtual network. 18, Select IP Address for Backend Poo! Configuration and select Save. 19. Select the Inbound rules tab, or select the Next: Inbound rules button at the bottom of the page. 20. In Load balancing rule in the Inbound rules tab, select + Add a load balancing rule. 21. In Add load balancing rule, enter or select the following information: 2 Expand table Setting Value Name Enter Ib-HTTP-rule IP Version Select IPv4 or IPV6 depending on your requirements. Frontend IP address Select Ib-frontend-1P. Backend pool Select Ib-backend-pool Protocol Select TCP, Port Enter 80. Backend port Enter 80. Health probe Select Create new. In Name, enter Ib-health-probe Select HTTP in Protocol Leave the rest of the defaults, and select Save. ntps:eam mierosot.comlen-ustazurelload-balancertutora-mut-avallablty-sets-portal st 1125124, 7-41 PM Tutorial: Creat 2 load balancer with more than one availabiliy sein the backend pool Azure portal - Azure Load Balancer | Mir. Setting Value Session persistence Select None. Idle timeout (minutes) Enter 15. Enable TCP reset Select checkbox Enable Floating IP Select checkbox. ‘Outbound source network _Leave the default of (Recommended) Use outbound rules to address translation (SNAT) _provide backend pool members access to the internet. 22. Select Save. 23, Select the blue Review + create button at the bottom of the page. 24, Select Create. © Note In this example we created a NAT gateway to provide outbound Internet access. The outbound rules tab in the configuration is bypassed as it's optional and isn’t needed with the NAT gateway. For more information on Azure NAT gateway, see What is Azure Virtual Network NAT? For more information about outbound connections in Azure, see Source Network Address Translation (SNAT) for outbound connections. Create virtual machines In this section, you create two availability groups with two virtual machines per group. These machines are added to the backend pool of the load balancer during creation, Create first set of VMs 1, Select + Create a resource in the upper left-hand section of the portal. 2. In New, select Compute > Virtual machine. 3. In the Basics tab of Create a virtual machine, enter, or select the following information: nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal rar 1125124,7-41 PM Tutorial: Creat 2 loa balancer with more than one availabiliy setin the backend pool Azure portal - Azure Load Balancer | Mir. Setting Project details Subscription Resource group Instance details Virtual machine name Region Availability options Availability set Security type Image Azure Spot instance Size Administrator account Usemame Password (2 Expand table Value Select your subscription Select Ib-resource-group. Enter Ib-VM1 Select (US) East US. Select Availability set. Select Create new. Enter Ib-availability-set1 in Name. Select OK. Select Trusted launch virtual machines. Select Windows Server 2022 Datacenter - x64 Gen2 Leave the default of unchecked. Select a size for the virtual machine. Enter a username, Enter a password 4, Select the Networking tab, or select the Next: Disks, then Next: Networking button at the bottom of the page. 5. In the Networking tab, enter or select the following information: Setting Network interface Virtual network © Expand table Value Select tb-VNet. nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal 1921 1125124, 7-41 PM Tutorial: Creat 2 load balancer with more than one availabiliy sein the backend pool Azure portal - Azure Load Balancer | Mir. Setting Value Subnet Select backend-subnet. Public IP Select None. NIC network security Select Advanced. group Configure network Skip this setting until the rest of the settings are completed. security group Complete after Select a backend pool Load balancing Load-balancing options Select Azure load balancer, Select aload balancer _ Select load-balancer. Select abackend pool _ Select Ib-backend-pool. Configure network Select Create new. security group In the Create network security group, enter Ib-NSG in Name. Under Inbound rules, select +Add an inbound rule. Under Service, select HTTP. Under Priority, enter 100. In Name, enter Ib-NSG-rule Select Add Select OK 6, Select the Review + create tab, or select the blue Review + create button at the bottom of the page. 7. Select Create. 8, Repeat steps 1 through 7 to create the second virtual machine of the set. Replace the settings for the VM with the following information: © Expand table Setting Value Name Enter Ib-VM2 Availability set Select Ib-availabil Virtual Network Select tb-VNet nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal san 1125124, 7-41 PM Tutorial: Creat 2 load balancer with more than one availabiliy sein the backend pool Azure portal - Azure Load Balancer | Mir. Setting Subnet Public IP NIC network security group Configure network security group Load-balancing options Select a load balancer Select a backend pool Configure network security group Value Select backend-subnet. Select None. Select Advanced, Skip this setting until the rest of the settings are completed. Complete after Select a backend pool Select Azure load balancer. Select load-balancer. Select Ib-backend-pool. Select Ib-NSG. Create second set of VMs 1, Select + Create a resource in the upper left-hand section of the portal. 2. In New, select Compute > Virtual machine, 3. In the Basics tab of Create a virtual machine, enter, or select the following information: Setting Project details Subscription Resource group Instance details Virtual machine name Region © Expand table Value Select your subscription Select Ib-resource-group. Enter Ib-VM3, Select (US) East US. nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal 1521 1125124, 7-41 PM Tutorial: Creat 2 loa balancer with more than one availabiliy sein the backend pool Azure portal - Azure Load Balancer| Mir. Setting Availability options Availability set Security type Image ‘Azure Spot instance Size Administrator account Usemame Password Value Select Availability set. Select Create new. Enter Ib-availability-set2 in Name Select OK. Select Trusted launch virtual machines. Select Windows Server 2022 Datacenter - x64 Gen2, Leave the default of unchecked. Select a size for the virtual machine. Enter a username, Enter a password. 4, Select the Networking tab, or select the Next: Disks, then Next: Networking button at the bottom of the page. 5. In the Networking tab, enter or select the following information Setting Network interface Virtual network Subnet Public IP NIC network security group Configure network security group Load balancing Load-balancing options (2 Expand table Value Select Ilb-VNet. Select backend-subnet. Select None. Select Advanced, Skip this setting until the rest of the settings are completed. Complete after Select a backend pool Select Azure load balancer. nitps:eam mierosof.comlen-ustazurelload-balancertutora-mut-avallablity-sets-portal r621 1125124, 7-41 PM Tutorial: Creat 2 load balancer with more than one availabiliy sein the backend pool Azure portal - Azure Load Balancer | Mir. Setting Select a load balancer Select a backend pool Configure network security group Value Select load-balancer. Select Ib-backend-pool. Select Ib-NSG. 6. Select the Review + create tab, or select the blue Review + create button at the bottom of the page. 7. Select Create. 8. Repeat steps 1 through 7 to create the second virtual machine of the set. Replace the settings for the VM with the following information: Setting Name Availability set Virtual Network NIC network security group Configure network security group Load-balancing options Select a load balancer Select a backend pool Configure network security group Install IIS (2 Expand table Value Enter Ib-VMA, Select Ib-availability-set2 Select Ib-VMB. Select Advanced, Skip this setting until the rest of the settings are completed. Complete after Select a backend pool Select Azure load balancer. Select load-balancer. Select Ib-backend-pool. Select Ib-NSG. nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal aes 1125124, 7:41 PM Tutorial: Create load balancer wth more than one avalility sein the backend pool - Azure poral - Azure Load Balancer | Mir. In this section, you use the Azure Bastion host you created previously to connect to the virtual machines and install IIS. 1. In the search box at the top of the portal, enter Virtual machine. 2. Select Virtual machines in the search results. 3. Select Ib-VM1. 4. Under Payload in the left-side menu, select Run command > RunPowerShellScript. 5. In the PowerShell Script window, add the following commands to: ‘* Install the IIS server Remove the default iisstart.htm file * Add a new iisstarthtm file that displays the name of the VM PowerShell # Install ITS server role Install-WindowsFeature -name Web-Server -IncludeManagementTools # Remove default htm file Remove-Item C:\inetpub\wwwroot\iisstart.htm # Add a new htm file that displays server name Add-Content -Path "C:\inetpub\wwroot\iisstart.htm” -Value §("Hello World from" + $env:computernane) 6, Select Run and wait for the command to complete. nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal r621 1125124, 7-41 PM Tutorial: Creat 2 loa balancer with more than one availabliy setin the backend pool Azure portal - Azure Load Balancer | Mir. Run Command Script x © ripe exccaron compete PowerShell Scipt a f install 11S server role 2 Install-WindowsFesture -nane Web-Server -IncludevanagenentTools a Remove default htm file Remove-Iten C:\inetpub\imuroot\iisstart.hte 7 # Add a new htm file that displays server name Ll 8 Add-content -Path “C:\inetpub\wmroot \iisstart.hta” -Value ("Hello World fron” + sei pean {Coman HTTP Features, Default Document, 0. 7. Repeat steps 1 through 8 for Ib-VM2, !b-VM3, and Ib-VM4. Test the load balancer In this section, you discover the public IP address of the load balancer. You use the IP address to test the operation of the load balancer. 1. In the search box at the top of the portal, enter Public IP. 2, Select Public IP addresses in the search results 3, Select Ib-Public-IP. 4, Note the public IP address listed in IP address in the Overview page of Ib-Public-IP: nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal ror 1125124,7-41 PM Tutorial: Create a load balancer with more than one avaiabilily set in the backend pool - Azure portal - Azure Losd Balancer | Mir. | A mnatin-Momot Ae x [E © G_@ FE intpsypportatanurecom! fy myPubliciP-Ib_ x Bich x 2 Nom vf Bee © fake wine Aerie on 1 sanayes pos re) ascot i ctaruas cate wenus2izeres2.0 aa aston an 1 ceiver te aot roo aes 258 a vend ncn eet saci men © tot ces were tn tora ike sens acon ann salah eee B Dapponicstegs © pone 2 spe 1 secetycor 1 eortergte © conrtnagrnt try 2 Nee gpatronen 5. Open a web browser and enter the public IP address in the address bar: BD sisemae x € GA A Notsecure | 52156144248 8 Holto Wold fiom myVM1 6. Select refresh in the browser to see the traffic balanced to the other virtual machines in the backend pool. hntps:ileam microsoft. conver-usiazureoad-0ah certtoriasmult-avalablty-sets-portal rors Clean up resources If you're not going to continue to use this application, delete the load balancer and the supporting resources with the following steps: 1. In the search box at the top of the portal, enter Resource group. 2, Select Resource groups in the search results. 3, Select Ib-resource-group. 4. In the overview page of Ib-resource-group, select Delete resource group. 5. Select Apply force delete for selected Virtual Machines and Virtual machine scale sets 6. Enter Ib-resource-group in Enter resource group name to confirm deletion. 7. Select Delete. Next steps In this tutorial, you: Created a virtual network and a network security group. Created an Azure Standard Load Balancer. Created two availability sets with two virtual machines per set. Installed IIS and tested the load balancer. Advance to the next article to learn how to create a cross-region Azure Load Balancer: [centers reston on baa] nitps:leam mierosof.comlen-ustazurelload-balancertutoria-mut-avallablty-sets-portal pire

You might also like