How to Load Balance Webserver in Microsoft Azure

Windows-Azure

Before start configure load balancer for webserver, first of all we need to create 2 or more virtual machine with webserver role enable with IIS feature ready. After this load the same content in all web server; or probably a “hello world 1″‘s index.html at webserver A and “hello world 2″‘s index.html at webserver B for testing purposes.

After setting up 2 webserver, let’s start with creating a Load Balanced Set in Azure

1. Click on the demovm1 virtual machine that was created earlier.

2. Click on the ENDPOINTS tab.

3. Click on ADD button at the bottom of the page.

4. Select ADD A STAND-ALONE ENDPOINT and click the next arrow.

5. In the next screen select HTTP under name field drop down menu.

6. Check the check box for CREATE A LOAD-BALANCED SET. Then click on the right arrow button to continue to next screen.

7. Specify LBHTTP (Place any name you like) for the LOAD-BALANCED SET NAME, select HTTP in the PROBE PROTOCOL dropdown and in the PROBE PATH field specify /iisstart.htm (most probably your index page such as index.html). Click the check mark to continue.

8. Wait until the update is complete before proceeding.
9. Within the Microsoft Azure Management Portal open the demovm2 configuration and click ENDPOINTS.

10. Click ADD to launch the add endpoint wizard.

11. In the Add ENDPOINT screen, select the radio button option ADD AN ENDPOINT TO AN EXISTING LOAD-BALANCED SET. Select as LBHTTP load balancer. Then click on the arrow mark at the bottom right corner to continue.

12. Specify HTTP in the NAME field and click the check mark to complete the endpoint addition.

13. Wait until the update is complete before proceeding.

How to verify the Load Balacing

You have done create a load balance set for azure’s web server. So how can we test whether the load balance set had take effective? From here, we need to access the website.

1. Select demovm1 virtual machine and click on the dashboard.

2. Scroll down and copy the cloud services DNS NAME URL under quick glance section.

3. Click on new tab in internet explorer and paste the URL in the address bar.

4. This will serve up the modified content from iisstart.htm. Note the server name (could be demovm1 or demovm2).

5. Now keep pressing the F5 button in your browser until you see the server name change to the second server in the load balanced set.

Done verify on the load balance set. This allow the traffic to be load balance to demovm2 webserver when demovm1 receiving high load.

If you don’t have Microsoft Azure account, you may sign up Microsoft Azure free trial for 1 month with $200 or RM650 credit.

Tags: , ,

No comments yet.

Leave a Reply