This blog post will cover a step by step guide how to create azure external load balancer in classic deployment model.
In this scenario, we will load balance two Windows Server 2012 virtual machines running IIS (Internet Information Services) web pages in the same Azure region.
If one IIS server is down or IIS service stops for whatever reason then the load balancer will automatically redirect traffic to the other IIS virtual machine instance.
The load balancer will be created using the Azure Classic Portal.
This post can be used together with:
Here are the steps to create an Azure External Load Balancer
Steps
The steps to create this will be as follows:
1. Build WinClassicFE01 Windows 2012 Virtual Machine
2. Remote Desktop to WinClassicFE01 Windows 2012 Virtual Machine
3. Install IIS (Internet Information Services) on WinClassicFE01 Windows 2012 Virtual Machine
4. Open IIS (Internet Information Services) on WinClassicFE01 and edit https bindings on Windows 2012 Virtual Machine
5. Edit IIS page to correspond to WinClassicFE01 on Windows 2012 Virtual Machine
6. Create Load Balanced endpoint to WinClassicFE01 on Windows 2012 Virtual Machine
7. Build WinClassicFE02 Windows 2012 Virtual Machine
8. Create Load Balanced endpoint to WinClassicFE02 on Windows 2012 Virtual Machine
9. Open web browser to https://<cloudservice>.cloudapp.net
10. Pressing F5 on keyboard to refresh the page a number of times to confirm Load Balancing between VMs
11. Will show load balancing between to VMs WinClassicFE01 and WinClassicFE02 in the load balancer set.
12. Stop IIS service on WinClassicFE02 to confirm traffic will get redirected to WinClassicFE01
13. Pressing F5 on keyboard to refresh the page will direct all traffic to WinClassicFE01 only
14. Successfully implemented and configured an external load balancer between to Windows IIS endpoints.
Please note: Virtual Machines and Azure components have been created in the “Free One Month Trial” Azure subscription for testing and Proof of Concept purposes only.
Cloudinspired.com do not hold any responsibility for charges incurred within your subscription when following guides on this web site.
To sign up to a Microsoft “Free One Month Trial” follow this link https://azure.microsoft.com/en-gb/pricing/free-trial/
Diagram
![Azure External Load Balancer](https://www.cloudinspired.com/wp-content/uploads/2016/02/azureloadbalancer.png)
Steps
1. Build WinClassicFE01 Windows 2012 Virtual Machine
Click New
Compute > Virtual Machine > From Gallery
Choose Windows Server 2012 R2
Enter and Select:
- Virtual Machine Name, in this case its WinClassicFE01
- Select the Size of the Virtual Machine
- Standard Storage Tier
- Username / Password
Enter and Select:
- Cloud service
- Virtual network
- Subnet
- Storage account – Use Automatically Generated
- Availability set – AV01
- Standard storage tier
- Leave endpoints as default
Leave everything by default and click the tick.
Virtual Machine will then start provisioning and can take anything up to 5 minutes to complete.
Once complete, VM will show a green tick as running
2. Remote Desktop to WinClassicFE01 Windows 2012 Virtual Machine
At this stage, your VM will be ready to connect over the internet using the RDP (Remote Desktop Protocol).
Drill down into the VM and click the Dashboard menu item.
Then click Connect at the bottom of the screen.
This will give you the option to run a .rdp file to the DNS service frontendlb.cloudapp.net that was configured when the cloud service was created.
Click open with
The cloud service will connect via a port number that corresponds at the VM endpoint.
For example this is port 62663 using “frontendlb.cloudapp.net:62663”
Click Connect
Click Connect
Enter the credentials, username and password entered while creating the VM
Click yes to accept the certificate not from a trusted certificate authority (this is for test purposes only)
3. Install IIS (Internet Information Services) on WinClassicFE01 Windows 2012 Virtual Machine
Once logged in via Remote Desktop to the Virtual Machine, Server Manager should open automatically. If it doesn`t then select Server Manager from the start menu.
Click Manage and Add Roles and Features
Click Next
Click Next
Click Next
Select Web Server (IIS), Click Next
Click Add Features
Click Next
Click Next
Click Next
Click Install
Wait for Installation to Complete, Click Close when done
4. Open (Internet Information Services) on WinClassicFE01 and edit bindings on Windows 2012 Virtual Machine
Click Start Button in Windows 2012 Server
Click Down Arrow
Click Internet Information Services
Click Sites
Drill down to Default Web Site
Right click default web site a click edit bindings
Click Add
Choose https, and SSL certificate
View Certificate details and confirm
Confirm https added to site binding and click close
5. Edit IIS page to correspond to WinClassicFE01 on Windows 2012 Virtual Machine
Go to C: drive
C:\inetpub\wwwroot directory
Edit iis-85 with mspaint, add in Server name. For example in this case WINCLASSFE01.
6. Create Load Balanced endpoint to WinClassicFE01 on Windows 2012 Virtual Machine
Drill down into first Windows Server to load balance
Go to Endpoints
Click add
Add a Stand-Alone endpoint
Choose HTTPS and port 443, tick Create a Load Balanced Set
Wait until HTTPS endpoint appears in list with Load Balanced set name
7. Build WinClassicFE02 Windows 2012 Virtual Machine
Build second load balanced Virtual Machine
Enter and Select:
- Cloud service – Creating Azure Cloud Service
- Virtual network
- Subnet
- Storage account – Use Automatically Generated
- Availability set – AV01
- Standard storage tier
- Leave endpoints as default
8. Create Load Balanced endpoint to WinClassicFE02 on Windows 2012 Virtual Machine
Drill down into second Windows Server to load balance
Go to Endpoints
Click add
Add an endpoint to an existing load balanced set – Choose set created above from drop down.
Confirm details and click the tick box
Wait until HTTPS endpoint appears in list with Load Balanced set name
Go to C: drive
C:\inetpub\wwwroot directory
Edit iis-85 with mspaint, add in Server name. For example in this case WINCLASSFE02.
9. Open web browser to https://<cloudservice>.cloudapp.net
Continue to this website
10. Pressing F5 on keyboard to refresh the page a number of times…
11. Will show load balancing between to VMs WinClassicFE01 and WinClassicFE02 in the load balancer set.
Azure External Load Balancer is now configured to load balance between two Virtual Machines.
12. Stop IIS on WinClassicFE02 to confirm traffic will get redirected to WinClassicFE01
Click start, search button in top right hand corner.
Type “cmd”
Type “iisreset /stop”
Thanks for the indepth step by step guide on Azure load balancing. Really helped me!
It’s amazing designed for me to have a site, which is useful in support
of my experience. thanks admin
I want to to thank you for this excellent read!! I absolutely enjoyed every bit of it.
I’ve got you bookmarked to look at new things you post…
This post will assist the internet users for creating new website or even a blog from start to end.