Professional Documents
Culture Documents
com
Learn how to get started with Azure Load Balancer by using the Azure portal to
create a public load balancer and three VMs.
Prerequisites
Connecting to Azure
● Standard reference
● Basic Reference
Ratings
1
Dr. Fatma SIALA Kallel
In this section, you create a load balancer that balances the load of virtual machines.
When you create a public load balancer, you create a public IP address configured
as the front-end (namedLoadBalancerFrontenddefault) for the load balancer.
1. In the upper left corner of the screen, clickCreate Resource > Networking > Load
Balancer.
2. In the tabBasic functionsof the pageCreate a load balancer,enter or select the
following information:
TABLE 1
Setting Value
Subscription Select your subscription.
Resource group SelectCreate,then enterCreatePubLBQS-rgin the text box.
Add a SelectNo.
IPv6 address For more information about IPv6 addresses and the load
public balancer, seeWhat is Azure Virtual Network IPv6?
3. Accept the defaults for the remaining settings, then selectCheck + create.
2
Dr. Fatma SIALA Kallel
A backend address pool contains the IP addresses of virtual NICs connected to the
load balancer.
Create the main address poolmyBackendPoolto include virtual machines for load
balancing Internet traffic.
3
Dr. Fatma SIALA Kallel
The load balancer monitors the state of your application with a health probe.
The health probe adds or removes virtual machines in the load balancer based on
their response to health checks.
CHART 2
Setting Value
Name Come inMyHealthProbe.
Protocol SelectHTTP.
Port Come in80.
A load balancing rule is used to define the distribution of traffic to virtual machines.
You define the front-end IP configuration for incoming traffic and the back-ends IP
address pool for receiving traffic. Source and destination ports are defined in the
rule.
● Has a namemyHTTPRule.
● Can be found in the front-end namedLoadBalancerFrontEnd.
● Listen on theHarbor 80.
● Directs load-balanced traffic to the named back-endmyBackendPoolon the
Harbor 80.
4
Dr. Fatma SIALA Kallel
TABLE 3
Setting Value
Name Come inMyHTTPRule.
IP address version SelectIPv4
Front-end server IP SelectLoadBalancerFrontEnd
address
Protocol SelectTCP.
Port Come in80.
1. At the top left of the screen, selectCreate Resource > Network > Virtual Network,
or searchvirtual networkfrom the search box.
2. InCreate a virtual network,enter or select the following information under the
tabGeneral :
5
Dr. Fatma SIALA Kallel
TABLE 4
Setting Value
Project details
Subscription Select your Azure subscription
Resource group SelectCreatePubLBQS-rg.
Instance details
Name Come inmyVNet
Region SelectWestern Europe
CHART 5
Setting Value
IPv4 address space Come in10.1.0.0/16
CHART 6
Setting Value
Subnet name Come inmyBackendSubnet
Subnet address range Come in10.1.0.0/24
7. SelectRegister.
8. Select the tabSecurity .
9. UnderBastionHost,selectEnable.Enter the following information:
CHART 7
Setting Value
stronghold name Come inmyBastionHost
AzureBastionSubnet address space Come in10.1.1.0/24
Public IP address SelectCreate new.
ForName, Come inmyBastionIP.
SelectOK.
In this
section, YOU Go on create three machinery virtual
(myVM1, myVM2AndmyVM3)in three different areas (Area 1, Area 2AndArea 3).
6
Dr. Fatma SIALA Kallel
These VMs are added to the load balancer backend pool created earlier.
1. At the top left of the portal, selectCreate Resource > Compute > Virtual Machine.
CHART 8
Setting Value
Project details
Subscription Select your Azure subscription
Resource group SelectCreatePubLBQS-rg.
Instance details
Virtual machine name Come inmyVM1
CHART 9
Setting Value
Network interface
virtual network myVNet
Subnet myBackendSubnet
Public IP address SelectNone.
7
Dr. Fatma SIALA Kallel
CHART 9
Setting Value
Network adapter network security SelectAdvance
group
Configure a network security group SelectCreate new.
InCreate a network security group, Come in
myNSGInName. BelowRules
of traffic entering,
select +Add an inbound rule.
CHART 10
Setting Value
Surveillance
Boot diagnostics SelectDisabled
7. SelectReview + create.
8. Review the settings, then selectCreate.
9. Follow steps 1-8 to create two additional VMs with the following values and all
other settings the same asmyVM1:
CHART 11
Setting Virtual machine 2 Virtual machine 3
Name myVM2 myVM3
Availability Zone 2 3
Security group Select THE
Select THE
network bandmyNSGexisting bandmyNSGexisting
Load balancer outbound rules configure outbound SNAT for VMs in the backend
pool.
CHART 12
Setting Value
Name Come inmyOutboundRule.
Front-end server IP SelectCreate new.
address InName, Come inLoadBalancerFrontEndOutbound.
SelectAddress IPsOrPrefix of address IP.
SelectCreatebelowPublic IP addressOrIP address prefix
public.
For Name,
Come inmyPublicIPOutboundOr
myPublicIPPrefixOutbound. SelectAdd.
Time limit of inactivity Move the cursor to15 minutes.
(minutes)
Reset of SelectEnabled.
TCP protocol
Main pool SelectCreate new.
Come inmyBackendPoolOutboundInName.
SelectAdd.
Port Allocation -> SelectManually choose the number of output ports
Port Allocation
Output Ports -> SelectPorts per instance
Choose By
Output Ports -> Come in10000.
Ports Per Instance
4. SelectAdd.
9
Dr. Fatma SIALA Kallel
Install IIS
1. SelectAll the servicesin the menu on the left, selectAll resourcesthen, in the list
of resources, selectmyVM1which is in the resource groupCreatePubLBQS-rg.
PowerShellCopy
2. Copy the public IP address and paste it into your browser's address bar. The
default IIS web server page is displayed on the browser.
10
Dr. Fatma SIALA Kallel
To see the load balancer distribute traffic among the three VMs, you can customize
each VM's default IIS web server page and then force your browser to refresh from
the client machine.
Clean up resources
When you no longer need them, delete the resource group, load balancer, and all
associated resources. To do this, select the resource groupCreatePubLBQS-rgthat
contains the resources, then selectDELETE.
11