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.

 
4 Comments
  1. Your comment is awaiting moderation.
  2. Your comment is awaiting moderation.
  3. Your comment is awaiting moderation.
  4. Your comment is awaiting moderation.
  5. Your comment is awaiting moderation.
  6. Your comment is awaiting moderation.
  7. Your comment is awaiting moderation.
  8. Your comment is awaiting moderation.
  9. Your comment is awaiting moderation.
  10. Your comment is awaiting moderation.
  11. Your comment is awaiting moderation.
  12. Your comment is awaiting moderation.
  13. Your comment is awaiting moderation.
  14. Your comment is awaiting moderation.
  15. Your comment is awaiting moderation.
  16. Your comment is awaiting moderation.
  17. Your comment is awaiting moderation.
  18. Your comment is awaiting moderation.
  19. Your comment is awaiting moderation.
  20. Your comment is awaiting moderation.
  21. Your comment is awaiting moderation.
  22. Your comment is awaiting moderation.
  23. Your comment is awaiting moderation.
  24. Your comment is awaiting moderation.
  25. Your comment is awaiting moderation.
  26. Your comment is awaiting moderation.
  27. Your comment is awaiting moderation.
  28. Your comment is awaiting moderation.
  29. Your comment is awaiting moderation.
  30. Your comment is awaiting moderation.
  31. Your comment is awaiting moderation.
  32. Your comment is awaiting moderation.
  33. Your comment is awaiting moderation.
  34. Your comment is awaiting moderation.
  35. Your comment is awaiting moderation.
  36. Your comment is awaiting moderation.
  37. Your comment is awaiting moderation.
  38. Your comment is awaiting moderation.
  39. Your comment is awaiting moderation.
  40. Your comment is awaiting moderation.
  41. Your comment is awaiting moderation.
  42. Your comment is awaiting moderation.
  43. Your comment is awaiting moderation.
  44. Your comment is awaiting moderation.
  45. Your comment is awaiting moderation.
  46. Your comment is awaiting moderation.
  47. Your comment is awaiting moderation.
  48. Your comment is awaiting moderation.
  49. Your comment is awaiting moderation.
  50. Your comment is awaiting moderation.
  51. Your comment is awaiting moderation.
  52. Your comment is awaiting moderation.

Add a Comment

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