Get an overview of the Azure Traffic Manager to manage and control traffic between your Azure web apps. The demonstration includes setting up Azure Traffic Manager using the weighted model.
- [Instructor] The Azure traffic manager is used to direct traffic to specific and healthy endpoints. Ensuring that our web apps are always available. I've talked about the azure traffic manager in previous courses. But let's go ahead and review the workflow. First, our client queries DNS. DNS will then forward that query to Traffic Manager. Traffic manager will then send back the DNS name based on the routing method that we have selected, and we'll talk about routing methods in a moment. Next DNS then sends the DNS name back to the client and the client will then connect directly to that resource.
The four routing methods that we can use when configuring traffic manager for web apps include, performance, weighted, priority, and geographic. Let's go ahead and explore each of these in a little bit more detail, starting off with performance routing. Performance routing allows us to direct traffic to the endpoint with the lowest latency. In our example here our user makes request, request comes from DNS to the traffic manager. Traffic manager will then look for a healthy endpoint with the lowest latency and in our example here, that happens to be Canada East because Canada Central is offline.
Traffic manager will then pass that endpoint information back to DNS, DNS passes that to the user and the user will directly connect to Canada East. Next we have weighted routing. We use weighted routing to distribute traffic equally or based on the weight. If you want to use round robin which distributes the traffic equally among the endpoints you will use the same weight for all the endpoints and the default weight is one. In our example here, again, the user will pass the query to DNS, DNS traffic manager.
At this point traffic manager will pass the DNS endpoint back to the DNS service to go back to the client and here, the client will connect to Region B because that has the higher weight and is online. Next we have priority routing. And in priority routing we use a primary endpoint but if that primary endpoint is not available then traffic will be automatically directed to another endpoint based on a priority list. Again we'll go through the same scenario. In this case we can see that our primary endpoint is offline and failover one is next on our priority list.
Therefore that is what will be passed back to our client and then the client will connect to failover one. And finally we have geographic routing. And in this routing method, traffic is directed to the endpoint based on a geographic region from where the DNS query originated from. And this can satisfy sovereignty concerns. In our example here we have a user in Toronto, and again the query is passed through to DNS and then down to traffic manager. In this example because the user is from Canada, the user will be directed to endpoint one, because the assigned geo is Canada.
If that user was from New York then they'd be directed to endpoint two because the assigned geo is the world. There are a few considerations that you need to be aware of when using the Azure Traffic Manager for your web apps. First, web apps in the same region are already load balanced for you and failover functionality is already enabled therefore you may not need to use traffic manager. If you are using traffic manager you can only specify one web app endpoint per region in the Traffic Manager profile.
And finally, traffic manager's only available in the standard tier and above. Now that we've talked about traffic manager let's go ahead and implement it in Azure. I'm already in our Azure Web App resource group, and I'm simply going to go ahead and add traffic manager clicking add, start typing traffic, and select traffic manager profile. A blade will open up giving you some information about traffic manager itself, go ahead and click create.
Now you're going to go ahead and provide a name. I'm using the name lilweb. Now we can go ahead and select the routing method. For our demonstration today I'm going to go ahead and use weighted. Select your subscription and your resource group and then click create. And this'll take a few seconds to deploy. I'm going to go ahead close off my notification window, close my blade, close my everything blade, scroll back over to our resource group going to refresh it, and here we can see our traffic manager profile has been created for us.
And at this point we could go ahead and add in our endpoints. Go ahead click add. Provide a name. I'm keeping it very simple. Lil endpoint one. I'm going to go ahead and choose app service and I'm going to pick my app service.
Going to choose the first one and now I can go ahead and assign a weight, and then click okay. And now you can see our endpoint is being monitored. And you would go ahead and add in the rest of your endpoints. For our demonstration I'm going to end it here I don't think you need to see me add in a whole bunch of different endpoints. And that's all there is to it, to adding in Azure Traffic Manager to manage traffic to your Azure web apps.
Learn the intermediate-level skills needed to design Azure web and mobile apps for any organization, using the Azure Web Apps and Mobile Apps services. Instructor Sharon Bennett, a Microsoft Certified Solutions Expert, covers securing mobile and web apps with Azure Active Directory, creating WebJobs to script tasks such as queue processing and file maintenance, and extending mobile apps with custom code. Plus, learn how to update, back up, and restore your Azure apps.
As an intermediate-level course, an existing understanding of the Azure platform is required. After completing the training, IT professionals will also be better prepared for Azure certification.
- Create Azure web apps
- Create WebJobs
- Using Traffic Manager
- Adding a CDN to web apps
- Updating, backing up, and restoring Azure Web Apps
- Deploying Azure mobile apps