X
23Mar

Microsoft Azure: Implementing Internet Facing Load Balancers using Azure Resource Manager

Howdy Folks!

I was exploring Network Load Balancer in Azure Resource Manager and found out that you can also create an Internet Facing Load Balancer using Azure Portal. In this blog, I will show you How to create an External Load balancer using Azure Resource Manager. We will create two load balanced web-servers publically accessible through a common IP address. This IP address will be provided to the Internet facing load balancer that we will create in this blog post.

Scenario

xYz Corporation, a company that deals with financial services deals with managing the investment of all monies and accounting for all assets and capital project expenditures on daily basis. They provide services to both internal and external users. All these tasks are carried by a web server they have hosted publically.

The application is quite critical and hence the company can't afford any downtime. The number of users accessing the web application may increase on a specific day. This can cause sudden crashing of the web application. Moreover, the organizations tends to update the application very frequently. They can't afford any downtime while updating their web application. In this case, they tend to keep 2 separate similar servers. For the time being they can play with and perform updates in the second server while the original one is up and running. After verifying changes they could update the first one too.

Pre-Requirements

I will assume you have the following pre-requirements completed:

  1.  An Azure Subscription
  2.  Basic Networking knowledge
  3.  2 Windows server 2012 R2 Standard_A1 size VMs in the same VNET and corresponding subnet. Make sure both these VMs are in the Same Availability Set. They should have static private IPs and public IPs. (Public IPs are required to RDP into the machine to configure IIS)

In this Blog

  1. We will use 2 VMs in Resource Manager with IIS Role Installed. Both the VMs should be publically accessible using a Public IP(Public IP will be Required to RDP into the machine and install the IIS role and not for load balancing). Both the VMs are required to be in the same availability set with static private IPs.
  2. We will create a Load Balancer configuration with an Internet Accessible Public IP which clients will use to get connected to the website.
  3. We will create Backend Pools which will map your load balancer's IP to both your Azure VM's NICs.
  4. We will create a Health Probe so that when a probe fails to respond, Load Balancer stops sending new connections to the unhealthy instances. Existing connections are not impacted.
  5. At last we will create load balancing rule to Map public port 80 of your load balancer to your internal VMs.

Initial Configuration for IIS

Connect to both the VMs via RDP. Bind your IIS Website to the private IP address of your virtual machine. Perform this step for both the VMs. Make sure your firewall allows your server to be accessed publically. (I have turned off my firewall for the ease of explaining)

IIS Site Bindings

 

Afterwards, try to access your websites from your browser using the public IP addresses you assigned to them.

Load Balancer Directs to both the VMs

So your IIS in both the VMs have been successfully configured. Now lets move on to configuring load balancer.

Creating the load balancer

Click on `Browse’ on your Azure Portal and search for `Load Balancer’. Click On ADD to create a Load Balancer.

load balancer configuration

Add your Load Balancer’s Name. Choose Public as the scheme since we are creating the internet facing load balancer. Choose a Public IP for your VM. This IP will be used to access your websites externally. Using this particular IP all the requests will be routed to the internal web servers. Choose your subscription, resource group and Location.

Configuring LB

 

Wait for your deployment to be finished. And after a couple of minutes, a new page will be opened where you can configure your LB’s settings.

LB Configuration

Configuring the Load Balancer

Creating the Backend Pool

We will do configuration for Backend Pool first. In this menu, you can specify your Availability Set and specific VMs you want to be load balanced. In this menu, click on ADD and choose your availability set and specific VMs.

Backend Pool

Creating the Probe

Select the Probes blade and provide it a name, your public port to connect to your VMs (80 here), and your desired configurations for path, interval and unhealthy threshold. Click Save.

Probe

 

Creating the Load balancing rules

Click on Load balancing rules ribbon. Click on ADD. Choose a Name, Protocol, Your Frontend Port(80 here) and the backend port. In the Backend Pool, choose the pool of those VMs we created in a previous step. Configure the rest options as desired or leave them as it is for testing.

Load Balancing Rule

 

Testing the Internet Facing Load Balancer

Since we have successfully created a load balancer and configured it accordingly, now is the time to test it. We will try browsing the public IP of the load balancer from our browser.

Redirected to 1st VM

Here, you can see the requests are automatically routed to 1st server. We will try putting some load on the servers to see what happens. For this, I am using Visual Studio Load Tester.

Putiing the Load

After the load is thrown on the server, you will see all the incoming requests to the load balancer are routed to the second server.

Redirected to 2nd VM

 

So, thank you friends. This is it regarding the load balancers. If you have any queries feel free to ask in the comments. You can also follow me on twitter @SinghCloudy.

Thanks & Regards

Karanmeet Singh

Related

Azure Blob Storage: The PowerShell Way!

Hi folks!Great to see you again.This blog post is purely based on Azure Blob Storage: The PowerShell...

Read More >

Create a Windows Server 2012 R2 VM using ARM in Azure PowerShell

Hi Folks,In this Blog Post we will learn how to create an Azure ARM Virtual Machine using Azure Powe...

Read More >

Continuous Integration/ Continuous Deployment VSTS

Following the below steps you can build and deploy your ASP.NET  app to Azure from either Visua...

Read More >

How to Sync On-premise AD with Windows Azure AD using Azure AD Connect tool

 Azure AD is a service that provides identity and access management capabilities in the cloud. ...

Read More >

Creating a Point-to-Site Connectivity using Azure Resource Manager

Configure a Point-to-Site connectivity to a VNet using PowerShell (ARM Mode)Task 1: Create a Self-Si...

Read More >

How to Create an Azure Virtual Network by using a Deployment Template

Hello Folks!In this Blog post, we will try to learn how to create an Azure V-Net using an ARM templa...

Read More >

Locking VMs and Resources Groups with Azure Resource Manager using Azure PowerShell

Hello Folks!In this blog post we will be talking about locking down your Azure Resources with Azure ...

Read More >

Microsoft Azure Stack : Power of Azure in our datacentre

Why Azure Stack?Microsoft Azure Stack is a new hybrid cloud platform product that enables our organi...

Read More >

Microsoft Azure : Mobile Services - Xamarian.Android with .Net

NOTE: Microsoft Azure recommends Azure App Service Mobile Apps for all new mobile backend deployment...

Read More >

Microsoft Azure : The cloud for modern business

 Why Azure? Microsoft Azure: Cloud Computing Platform and Services Move faster Save Money ...

Read More >

Share

Comments

Nice blog. I understood the concept very well. This blog is very informative. And it's very interesting topic. Visit to get more knowledge. Want to get create Microsoft Azure AD. please visit https://www.hex64.net/how-to-create-azure-ad-and-connect-it-to-azure-ad-vm/
11/15/2019 5:31:36 PM | Reply

Post a Comment

Try DevOpSmartBoard Ultimate complete Azure DevOps End-to end reporting tool

Sign Up

  • Recent
  • Popular
  • Tag
Monthly Archive
Subscribe
Name

Text/HTML
Text/HTML
Contact Us
  • *
  • *