Module 7: Assignment - 4
Tasks To Be Performed:
- Deploy 2 VMs in different regions
- Balance the load on these VMs geographically
To accomplish this please use Azure Traffic Manager
Step1: VMs
To create the 2 VMs I follow steps in Assignment 1: Module 4 (I make sure to use different regions)
I opened port 80 (HTTP) and installed Apache.
I tested the Apache service on both VMs using their respective “Public IPs” directly.
Success
Step 2: Set Up Traffic Manager
-
I Navigate to Traffic Manager Profiles:
- In the Azure Portal, I search for “Traffic Manager profile” and click “+Create”.
-
I Configure the Profile:
- I fill in the details for the profile, like the name and resource group.
- For the routing method, I select “Geographic” to ensure traffic is routed based on the geographic location of the DNS queries.
-
I Create the Profile:
- I review the settings and create the Traffic Manager profile.
- I review the settings and create the Traffic Manager profile.
Step 3: Add Endpoints
- I Add VMs as Endpoints:
- Within the Traffic Manager profile, I click on “Endpoints” and then “Add” to configure my VMs as endpoints.
- I enter the details for each endpoint, including the name, target resource type, target resource, and the geographic location it serves.
Step 4: Configure DNS
- I Configure DNS Names:
- The Traffic Manager profile will have a DNS name, like
http://mytrafficmanagerprofile12345.trafficmanager.net
. - I use this DNS name to access my application, and Traffic Manager will route traffic to the appropriate VM endpoint based on the geographic routing method.
- The Traffic Manager profile will have a DNS name, like
Step 5: Test the Configuration
I Test the Traffic Manager Setup:
I access the Traffic Manager DNS name from different geographic locations to verify that it routes to the closest regional VM.
I used localbrowser.com
to see how my page looks from another country, specifically Spain, and it redirected to my VM in “North Europe” as expected since it is closer than “East US”.
Success
Without simulating my location, no matter how many times I refresh my page, I am directed to the VM in “East US” because I am located in the US.
Success