Introduction
In this article, I will implement Azure Traffic Manager. Azure Traffic Manager is a global DNS load balancer from Microsoft Azure, that efficiently distributes network traffic across various endpoints like Azure web apps and VMs. This ensures optimal availability and responsiveness for applications, especially those deployed across multiple regions or data centers.
Prerequisites
- Azure Subscription
- Two Azure Web Apps or VMs
- Use my article for creating Azure web apps.
Use cases
- Global Application Deployment
- High availability and responsiveness
- Customized Traffic Routing
Benefits
- Scalability and flexibility
- Improve your application availability.
- Cost-effectiveness
Step 1. Start by creating Azure Web Apps in two different regions. In my case, these have already been configured.
Note. Verify that your web application SKU is compatible with Azure Traffic Manager.
SKU and Size: Choose Standard S1 with 100 total ACU and 1.75 GB memory.
Step 2. For demonstration purposes, I simply browse my application.
Step 3. The second application is currently running in the West Europe region.
Step 4. For demonstration purposes, I simply browse my application.
Azure Traffic Manager Implementation
Step 1. Go to Azure marketplace and search for Traffic Manager Profile.
Step 2. Specify a unique name for the Traffic Manager; in my case, I've chosen trafficmanager2451.
Additionally, I've opted for the Priority routing method for enhanced control over traffic distribution.
It's important to note that the Traffic Manager profile's region is not specified here as it is a global service.
Step 3. After successfully creating the Traffic Manager, navigate to the "Endpoint" section on the left side pane.
Endpoint 1
- Type: Azure Endpoint
- Name: Enter a descriptive name.
- Resource Type: Choose "App Service."
- Target Resource: Specify the first App Service.
- Priority: Set a priority value (e.g., 1 for the highest).
Endpoint 2
- Type: Azure Endpoint
- Name: Provide another descriptive name.
- Resource Type: Select "App Service."
- Target Resource: Specify the second App Service.
- Priority: Set a priority value (e.g., 2 for the second highest).
Step 5. Navigate to Traffic Manager, select Configuration under settings, and set the Protocol to HTTPS with port 443. Typically, the Traffic Manager listens on the HTTPS port for secure communication.
Step 6. Verify that the endpoints are now online. You can successfully browse the application using the Traffic Manager URL.
Step 7. Simply go to the Traffic Manager overview, copy the DNS address, and use it to browse the application instead of the web app URL.
Step 8. To verify, I'll stop the East US web app, and then attempt to browse the application using the Traffic Manager URL. This will help to confirm if the Traffic Manager profile is functioning correctly.
Great news! After stopping the East US web app and refreshing the browser, I successfully reached the West Europe region, confirming the successful implementation of the Traffic Manager profile. Well done!
Conclusion
The Traffic Manager implementation with prioritized routing is successful. Verification by stopping the East US web app and refreshing the browser confirmed seamless redirection to the West Europe region, demonstrating effective traffic distribution.