Azure Traffic Manager Tutorial | DNS load balancer intro

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Nice demo. thanks for sharing.

👍︎︎ 2 👤︎︎ u/dogmanky 📅︎︎ Jan 02 2020 🗫︎ replies

Nice work ! keep em coming

👍︎︎ 2 👤︎︎ u/ab624 📅︎︎ Jan 02 2020 🗫︎ replies

Thank you. Very easy to follow. I got the concept. Please do more tutorials.

👍︎︎ 2 👤︎︎ u/rmwidze 📅︎︎ Jan 02 2020 🗫︎ replies
Captions
and the topic for today is our Traffic Manager globally scalable DNS routing service if you're building multi-region applications this is a perfect service for you so stay tuned as always let's start with traffic manager definition first of all and foremost its DNS base traffic load balancer its main purpose is to distribute the traffic across your services while still providing this high availability and high responsiveness for those applications so it is a very fast service and the main way it works is that for each traffic manager he defines something called end point and you will have multiple end points behind a traffic manager profile and when it comes to end points they can be either services with another where you have a lot of additional integrations or it can be any internet facing service that you use once endpoints are defined a traffic manager will start routing to gina's traffic to your services based on two things traffic routing method which you will be choosing when creating the profile and additionally a half of the end point as such traffic manager will periodically check your endpoints so that they need to return a status code of 200 or whatever you will define to make sure that those are running and it is routing the traffic to the services that are up and running and once the end point is chosen and name service lookup will be written to the user so that the further communication is established between the user and a specific service and now we can actually talk about the traffic routing methods because this is the key part that you will be configuring for traffic manager profiles first of all what are the routing methods the first one is performance based so it's that so-called find me the closest end point to me based on the network latency in this example if you have two endpoints behavior your traffic 101 for north europe and one for East us if your users are coming from instance from Europe they will be redirected to the north Europe web application and in case of Brazil they will be redirected to East us because those are the closest services and service and points to them based on that network latency the second one is weighted so for each of the end points that you have in a similar example you establish a weight and that weight is an integer between one and a thousand and based on that weight traffic will be distributed accordingly the freed option is geographical well this sounds similar to the performance one it is quite different because for each profile you actually define which geographical locations based on where user actually started their DNS query from should be redirected in which case you can say for instance entire globe should be redirected to my north Europe but because of some let's say legal reasons I want all my users from us to be redirected to the east us application so that I only process data within the US region and this is one of the use cases that you would want to use geographical the next one is priority based so priority is very simple for each end point you define a priority and once the priority is defined all the traffic is actually routed to the highest priority server as long as it's healthy and later whenever that end point changes to not healthy all the traffic will be routed to the second highest priority server that still remains healthy so those kind of routings are usually used to provide a full backup services for your disaster recovery scenarios and the next routing method is multi-value in this case within a single query your applications are able to get a list of all the end points on the back end but the difference here is you cannot use name server mappings for the endpoints you can only use IP v4 and v6 and it's up to your client application to the default book itself but it still has some narrow use cases that you want to use that and the last one is subnet so you can actually define the traffic to your back-end end points based on a subnet definition of your incoming users so based on their IPS you can actually define that those users will go to North Europe and the others will go to the other applications if you don't specify any subnet this will be the none and the fallback service for all the other traffic in terms of the additional feature that you get you also get endpoint monitoring so a traffic manager the t-mobile meter all the end points for your back-end to ensure that it only routes the traffic to the ones that are healthy and if you endpoints are with another you get a lot of additional integrations also you can do nested endpoints so you can actually nest multiple traffic manager profiles in order to take advantage of multiple routing methods within single manager profile you also have traffic views so you can actually view the traffic coming from the wall that goes through your traffic manager you'll have some real-time user measurements and you have some metric in dollars all those additional features are also available as part of the traffic manager and for today for demos I will show you how to create a traffic manager profile and after profiles created I will show you the performance weighted in Geographic based routings for the manager profiles for today I will show you how to use a traffic manager and also how to test it using two VMs within two different regions so that we see the differences when connecting two different with applications but so that you and I don't have to create so much I created a CLI script that will be able to execute and you'll have it down in the comments so that you set up your environment within just seconds so let's go to the portal and start executing our script before you execute the script let me show you what it does first of all it creates a natural resource management group called other traffic manager introduction and within this group it will create two virtual machines to up service plants within two regions and two web applications and the very last step it will list those web applications and list those virtual machines so basically just copy/paste the script from the repository go to our cloud shell open the window full screen and paste it in once the terminal initializes right-click on the window paste as plain text and let it run after about five and a half minutes scripts should be done and you should see this output with the addresses for your web applications and the addresses for your virtual machines so before we go into those let's minimize this for a second and let's open our resource groups let's go to our Traffic Manager introduction and show you what do we have here let's enable grouping so it's easier to see grouping by type so it still didn't refresh for the second web application other will be there in a second so first of all you have two web applications let me just refresh that yep East us two and North Europe web application as you see there in respective regions and you have virtual machines also in East US and North Europe so we have this start of the demo where we can test everything so first of all what do we need to do if we go back to the shell we need to grab this URL for the first web application and paste it in as you see this is a starting page it's empty right now I also gave you here the address to kudo which is the terminal for you to manage the service so you can actually open it and log into this east us to a virtual machine and go to the powershell so what we want to do is we want to change this default web page so that it actually says east us too so we know which one of the servers is returned by the traffic manager and to do so we're gonna go to kudo go to site wlwt's and here's a hosting start with this default page that you see here so let's just edit it and paste in the example that I gave you here for the East you as I prepared a very small HTML for you twist to paste then hit save refresh the page and as you see hello from east us too so we need to do the same for the second web application paste the URL I miss the T at the end and paste and as cm for CUDA go to debug partial open side ww-would hosting start edit and paste the example for West Europe paste it in hit save refresh and it's color from north Europe so now we have two applications and will be very easy to distinct whenever we were redirected by traffic manager to east us or north Europe we also have two VMs that we'll be using to test the traffic manager but before we use those let's actually create the traffic manager profiles since our environment is were now ready to be tested so let's hit create resource and type traffic manager we need to create a traffic manager profile hit create and provide the name I'm gonna call it traffic manager demo this is taken so I'm gonna add one it's also taken maybe a.m. at the end it has to be globally unique name the first routing method i'm gonna choose performance this is the first demo but remember you can actually change at post creation so hit performance select the resource group that i just created and hit create so CC to create the traffic manager profile you literally just need to provide the name and the initial routing method and it was created so let's go to the traffic manager and in here you can actually start configuring it as you see it's currently enabled so one of the cool things is that you can disable the profile if you don't even want to use it this is that URL that you're gonna be using for the traffic manager and currently monitoring status is inactive because we don't have any endpoints defined so let's start creating endpoints to do so go to the left panel go to endpoint section hit add we're gonna be choosing other endpoint you have also external and nested as we were talking about but my applications are with another those are other up services I'm going to choose our end point I'm going to call one yeast us two I'm gonna choose the type of other serviced is gonna be up service and the target resource allows me to pick from my existing up services so this case demo web east us two and just hit OK after a few seconds you get east us to status enabled monitoring status checking endpoint so it should take about minute or two for this to be online and we need to do the same and add an additional endpoint for our north europe so let's call it north europe let's hit up service again target resource in this case is north europe and hit ok and now we just need to wait about a minute or two you can wait here or you can go to overview where you also get the list of your endpoints once both endpoints are online you can start actually testing because if I will copy the DNS name what will happen right now it will route me by some performance so the closest server to me so if everything went correctly since I'm based in Poland it should route me to the north Europe let's hit open as you see hello from North Europe so this is perfect and it would be very hard for me to test if this works because every time gonna refresh this page or every time I'm gonna open new window I'm always gonna land in North Europe and that's why we set up those two VMs if we go back to the cloud shell here and start copying the paste let's do something like that I have a remote desktop connection manager which I like to use to test remote desktop connectivity I'm gonna add a server here and I need parameters from the script so I need this public IP of the first server to paste it in the server name I need the name in a display name so to paste it here I need a password which I need to pass into login credentials into the password section remove the domain and copy the username of my administrator account so he Dalit and double click to connect accept the certificate and connect additionally you need to do the same for the second one so let's add another server at the server server name copy also the name of it trace the name copy the password welcome credentials password domain and of course admin user name hit OK and also connect to the server and additionally access the certificate since my virtual machine in u.s. two is almost done so let's hit OK let's close those windows those are the first time windows when initializing the VM so see see this is a very clean VM that I just created nothing is in here so what you can do right now is open an Internet Explorer and paste the URL of your service so let's close this window let's place the URL actually we need to copy again from the traffic manager profile and paste it here into the browser URL and as you see hello from east us too if we're gonna do the same action on our North Europe we should see North Europe observers responding so let's close this window again let's place the URL let's press ENTER and see the message North Europe so as you see our performance based routing already works just fine and let's try a different one this time let's use weighted routing method so let's go back to the portal and you go down to configuration where you can actually change the rotating method from performance to weighted it's safe and once you do it you will be able to actually go back to your endpoint section and now for each end point notice that the weight of one was assigned automatically and you can actually change it but if you don't change it with weight of one on both of those services all the traffic should be distributed randomly equally across those services so let's actually test that let's go back to our VM and let's test this scenario here and in our VM it doesn't matter if we're in north Europe or is to us right now if you're gonna refresh this page you always gonna get the same one because it's DNS and DNS is being cached so what do you actually need to do in order to properly test this you need to type CMD for the command line open Windows terminal and inside of Windows terminal type ipconfig slash flush DNS once you do it you can actually close the browser right now open it again and paste in the URL and try this couple of times to see if your weighted routing method works you should run only at 50% chance go to East us to assets see it worked just fine if you don't like testing with a browser you can always flush the ns here and try an ass lookup which is named service lookup and paste the URL here except remove all the parts that are URL specific because you just want the DNS name and as you see we right now got redirected to North Europe if you're gonna flush DNS again and do a name service look up again North Europe do it again and this time east us says to see it's totally random and it's as easy as you right now going here and changing the weight to be able to assign for instance thousand in which case I should almost always get ready erected to east us to and go back to the portal and test it here so flush the NS and let's look up north Europe flush Tina's and let's look up east us to so it right now picked up the configuration so we pretty much always should go to the looks like we landed in North Europe again so maybe didn't pick up the change it but if you're gonna flush the NS and just do it a couple of times you definitely gonna start seeing the pattern of you being dropped into East US time almost every time using those weights and lastly let's try one more configuration in which case this is the geographic type of configuration notice that if I will click Save it'll actually from me an error because you actually need to remove the end points before doing that because currently those end points don't have any geo assigned and now do will be assigned by default therefore it fails because the geo is primary and required field so it fails on the validation it's pretty silly but it's just one time process so change it to Geographic hit save once you say that you can go back to your endpoints and start creating them again right now let's choose it again east us to again observers and choose our observers in east us but notice now you have geo-mapping where you can actually specify that in case of north america i always want to route people to the east us to endpoint now I'm making sure that whoever is coming from this region will be automatically mapped what's cool here is that I can actually nest this further so I can say from North America but maybe specifically from United States so you can make sure that all those mappings are relevant to your application business needs and add additional endpoint in this case north Europe this again is up service its North Europe up service and I can say that entire world so everyone else should be landing in north Europe hit okay let's save it and let's see it works after a couple of minutes it will be picked up and we can go back to our application and start checking it so let's flash TNS let's copy the URL let's close the internet explorer and in case north Europe I should always land in North Europe in case of East us to remember that I need to flash DNS here as well as I need to open terminal and now I can actually open it and I should be landing in East us too and I should be landing in East us too every time here and every time here so if you just flash DNS and do nslookup this time based on a geography I should always and always and always be landing in north Europe if I would change this mapping for instance if I would say here additionally in new Europe in specifically Poland let me just find Poland here and hit save let me see if I'm gonna open this URL here for instance from the edge browser I should land in East us - perfect as you can see setting up traffic monitor is quite simple this is what I like about the service with just few minutes few clicks you're setting up but is otherwise hard to achieve with an azure globally available highly performant service for very low price you should use Traffic Manager whenever you're building cross region applications that's it for today hey that thumbs up leave a comment and subscribe if you want to see more and see you next time [Music]
Info
Channel: Adam Marczak - Azure for Everyone
Views: 22,100
Rating: undefined out of 5
Keywords: Azure, Traffic Manager, DNS, Availability, Tutorial, Step by step, load balancing
Id: aPNa7Axulhg
Channel Id: undefined
Length: 20min 57sec (1257 seconds)
Published: Thu Jan 02 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.