Before creating the Azure load balancer, we will have to create the availability set. The virtual network would have two virtual machines which are part of an availability set. A load balancer with an availability set is recommended to make your application highly resilient.
What is Availability Set ?
An Availability Set is a logical grouping capability for isolating VM resources from each other when they’re deployed.
Azure makes sure that the VMs you place within an Availability Set run across multiple physical servers, compute racks, storage units, and network switches.
If a hardware or software failure happens, only a subset of your VMs are impacted and your overall solution stays operational. Availability Sets are essential for building reliable cloud solutions.
The hardware location is divided into multiple
fault domains and
update domains. An
update domain is a group of VMs and represents group of resources which can be updated at same point of time. VMs in the same
fault domain share common storage as well as a common power source and network switch.
Create Availability Set
Search for availability set in the top navigation search box and then select it. On the new pane, select Add button to create new availability set. It would open a new Create availability set panel as shown below.
Provide inputs as shown below and then click on Review + Create. If all validations are successful, you can click on Create button to create the availability set.
Create Virtual Machines
After availability set is created, create the virtual network
demo-vnet and then create two virtual machines within that virtual network, with names
demo-vm2. While creating two VMs, make sure that you do not forget:
- To select the newly created availability set as shown in below snapshot
- To select the virtual network in networking tab of create virtual machine wizard
- To allow port 80, 443 and 3389. It would be required for our demo.
Also make sure that you have a virtual network with two virtual machines in it. If you want detailed steps, refer this blog post.
Next, we will create the public load balancer using these virtual machines and availability set.