Azure External Load Balancer in Classic

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
Azure External Load Balancer

Steps

1. Build WinClassicFE01 Windows 2012 Virtual Machine

Click New

azurenew

Compute > Virtual Machine > From Gallery

azurecreatevirtualmachine

Choose Windows Server 2012 R2

 

azurechooseanimage

Enter and Select:

  • Virtual Machine Name, in this case its WinClassicFE01
  • Select the Size of the Virtual Machine
  • Standard Storage Tier
  • Username / Password

azurevirtualmachine

Enter and Select:

  • Cloud service
  • Virtual network
  • Subnet
  • Storage account – Use Automatically Generated
  • Availability set – AV01
  • Standard storage tier
  • Leave endpoints as default

azurevmcreate2

 

Leave everything by default and click the tick.

azurevirtualmachine3

Virtual Machine will then start provisioning and can take anything up to 5 minutes to complete.

azurevirtualmachineprovision

Once complete, VM will show a green tick as running

Azurevm

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.

azuredashboard

azuremenu

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

azurerdp

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

azureremotedesktop

Click Connect

azurerdp2

Enter the credentials, username and password entered while creating the VM

azurecredentials

azurerdpconnect

Click yes to accept the certificate not from a trusted certificate authority (this is for test purposes only)

azurerdp3

 

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

windows2012servermanager

Click Next

windows2012addroles

Click Next

windows2012addroles2

Click Next

windows2012addroles3

Select Web Server (IIS), Click Next

windows2012addrolesiis

Click Add Features

windows2012addrolesfeatures

Click Next

windows2012addrolesfeatures2

Click Next

windows2012addrolesiis2

Click Next

windows2012addrolesiis3

Click Install

windows2012addrolesiis4

windows2012addrolesiis5

Wait for Installation to Complete, Click Close when done

windows2012addrolesiis6

 

4. Open (Internet Information Services) on WinClassicFE01 and edit bindings on Windows 2012 Virtual Machine

 

Click Start Button in Windows 2012 Server

windows2012start

Click Down Arrow

windows2012downarrow

Click Internet Information Services

windows2012iismenu

Click Sites

windows2012iissites

Drill down to Default Web Site

windows2012iisdefault

Right click default web site a click edit bindings

windows2012iisbindings

Click Add

windows2012iisbindings2

 

Choose https, and SSL certificate

windows2012iisbindings3

View Certificate details and confirm

windows2012certificate

Confirm https added to site binding and click close

windows2012sitebindings

 

5. Edit IIS page to correspond to WinClassicFE01 on Windows 2012 Virtual Machine

Go to C: drive

windows2012localdisk

C:\inetpub\wwwroot directory

windows2012wwwroot

Edit iis-85 with mspaint, add in Server name. For example in this case WINCLASSFE01.

windows2012iispage

6. Create Load Balanced endpoint to WinClassicFE01 on Windows 2012 Virtual Machine

 

Drill down into first Windows Server to load balance

Azurevm

Go to Endpoints

azureendpoint6

Click add

Azuremenu2

Add a Stand-Alone endpoint

azureendpoint2

 

Choose HTTPS and port 443, tick Create a Load Balanced Set

azureendpoint3

Wait until HTTPS endpoint appears in list with Load Balanced set name

azureendpoint5

7. Build WinClassicFE02 Windows 2012 Virtual Machine

Build second load balanced Virtual Machine

azurevmcreate

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

azurevmcreate2

 

8. Create Load Balanced endpoint to WinClassicFE02 on Windows 2012 Virtual Machine

Drill down into second Windows Server to load balance

Go to Endpoints

azureendpoint6

Click add
Add an endpoint to an existing load balanced set – Choose set created above from drop down.

azureendpoint7

Confirm details and click the tick box

azureendpoint8

Wait until HTTPS endpoint appears in list with Load Balanced set name

azureendpoint9

Go to C: drive

C:\inetpub\wwwroot directory

Edit iis-85 with mspaint, add in Server name. For example in this case WINCLASSFE02.

iispage1

9. Open web browser to https://<cloudservice>.cloudapp.net

 

Continue to this website

iiscert

10. Pressing F5 on keyboard to refresh the page a number of times…

iisfinal

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.

iispage3

12. Stop IIS on WinClassicFE02 to confirm traffic will get redirected to WinClassicFE01

Click start, search button in top right hand corner.

cloudinspiredsearch

Type “cmd”

cloudinspiredsearch2

Type “iisreset /stop”

iisresetcommand

13. Pressing F5 on keyboard to refresh the page will direct all traffic to WinClassicFE01 only

iispage2

14. Successfully implemented and configured an Azure External Load Balancer between two Windows IIS endpoints.

 

About cloudinspired

Cloud Inspired authors have over 30 years experience within the IT industry, providing expertise and knowledge on infrastructure, hybrid, public and private clouds platforms. Detailed easy to follow technical videos, training and tutorial guides are provided by subject matter experts covering various technologies including Azure, IaaS, SaaS, PaaS and Microsoft 365. This website focuses mainly on the Microsoft 365 and Azure Cloud platform and provides easy to follow step by step technical guides, diagrams, cloud certifications and tutorials. The aim is to deliver articles and videos on Microsoft 365 and Azure Cloud from start to finish on many different Azure services and certifications, building and increasing the viewers knowledge in a short, logical, easy to understand format quickly getting to the point of the subject matter! Check out the YouTube channel for a full list of published Cloud Inspired videos and lets get inspired about Cloud!

View all posts by cloudinspired →

4 Comments on “Azure External Load Balancer in Classic”

  1. 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…

     
  2. This post will assist the internet users for creating new website or even a blog from start to end.

     

Leave a Reply

Your email address will not be published. Required fields are marked *