What is the Azure Traffic Manager?
How do you use it?
And of course, why would you want to?
I'm going to tell you all about it coming up now.
Hello everybody, my name is Adam Gordon,
an edutainer here at ITProTV.
Back with another fun-filled and exciting conversation
as we continue examining what are Azure services.
We're going to take on the Azure Traffic Manager
in this episode.
We're going to look at this, as we always do,
asking three questions that help us to truly understand
what the service or feature is.
What is the Azure Traffic Manager?
Why would you want to use it?
What value does it provide to you in your organization?
Of course, always fun, always exciting,
how do we actually put this thing to work for us?
And how do we make sure it's going to work the right way?
When we think about what the Azure Traffic Manager is,
we want to really think about
not only the idea of traffic management
but the simplicity that we always take for granted of things
just being there when we ask for them.
And ultimately, we want to use them.
And those things are typically services and data.
We traditionally will refer to that in our diagrams over here
as a web app service that Azure can provide
some sort of webpage or some sort of thing
that we can connect to over the web and use.
Maybe we're googling, trying to look something up.
Maybe we are running some sort of database
that we want to be able to access
and ask a question against looking up our customer record,
or perhaps information about our bank balance
while we're standing at an ATM.
Any and all of those things will involve
some sort of web application or web service today.
And what traffic management allows us to do
is to be anywhere that we can be connected,
using an application or some sort of device,
smartphone, a tablet, a desktop, a laptop,
it doesn't matter what.
It's going to be able to point it at the Internet, ask a question,
"Where is my resource?
Can you please point me to it if I give you the address
and tell you where I want to go?”
And as a result of that, have a device, a service,
a functionality that's going to take that request
and ensure that it gets to the appropriate place
to give us the outcome we're looking for.
And this is the simplicity
of what traffic management really involves.
So when we answer the what is Azure Traffic Manager question,
it's really all about making sure that all of the user requests
for resources that we want to get to,
regardless of where they're located,
over in the West or over in the East data center,
or anywhere in between in the Azure fabric,
that these web application services,
these web apps that can be accessible and used,
that we couldn't get to them.
And if one were to fail for some reason,
one was unavailable, it's no longer there,
we can redirect our traffic down
and make it available somewhere else seamlessly
for the end-user ensuring there's no disruption
or interruption of their ability to consume a service.
Because after all, if you think about it,
when we request our bank balance
or want to see that latest information item
for the latest sale on Amazon, we don't want to wait.
We want that information to be available to us.
And why should we wait?
We should have the ability to be able
to immediately provide that from somewhere else.
And that's what Traffic Manager does for us.
So we add a couple of elements to our design here
and we put this question mark in
that represents that question we want to ask.
And that question is, in this case, where can I find itpro.tv?
I want to see that website.
I want to be able to see that resource.
Maybe I'm down here on my smartphone waiting for it to load
so I can watch one of my exciting episodes around
how you use and implement the Traffic Manager
from our library.
Well, when I do that, I'm going to send that request out
and it's going to go into the Azure Traffic Manager
sitting out there waiting for these requests.
And that Traffic Manager has been told exactly
what it needs to know.
Where should that request go?
Should it go to Azure West?
Should it go to Azure East in our data center fabric
where we have an application gateway
and a firewall waiting to accept it,
applying rules and business logic to it
and then allowing us to serve up that webpage,
provide me my ITProTV episode
on how to use Traffic Manager
from the appropriate Azure Web App Service?
In this case, a content delivery network
that would stream that video content for me.
And so what I would do is just have a line
that would come out of here
and will go across to either one of these.
And we would wind up being able to see
that traffic flowing in
and we would label one of these data center areas
our primary Traffic Manager profile.
And we'll see how that's done as we take a look
at how we implement Traffic Manager in just a few minutes.
And we would label another one of these our secondary
or our failover Traffic Manager profile.
Always available, always on, always monitoring,
but only serving up from our secondary or failover environment
if our primary were to become unavailable.
And then we would simply prioritize using our secondary,
streaming that content back out and never missing a beat.
And so when we look at what Traffic Manager involves,
it involves our ability to understand smartly
and in real-time how to move traffic
to ensure availability globally at scale, by the way.
When we think about why we'd want to use
Azure Traffic Manager,
the reality is, we all have a need to ensure
that the application services that our businesses provide,
that our users, our customers are consuming,
that those are always on, they are always available.
In today's modern, interconnected world
we don't have the ability, nor the luxury,
or the capability to explain to people
why we can't service those needs in real-time for them.
They expect that our web app will just always be there.
That's what they're paying us for.
That's what they have trust in us as providers to do.
And you have to serve as that need and step up
and make sure that you can take care of your customers.
ITProTV does that.
Our content is available 24/7, 365.
Always on, always available to you and you want to see it.
And the way we do that is
by leveraging this kind of infrastructure.
So making sure we understand the value
and the value proposition of why.
It's because we want to ensure always-on availability,
always-on content, on-demand for users
whenever they want to see it.
Let's turn our attention to how we actually make this work.
I want to take you on a tour and show you
how to implement the Azure Traffic Manager.
We're going to take a look at that right now.
Hello, everybody, let's actually jump on in.
Let's take a look
at how we actually get Traffic Manager configured.
I've gone ahead and built out two resource groups,
one called Traffic Manager,
the other called Traffic Manager West.
And we can see them right down here.
And I've already taken the liberty of configuring web application
that will run in each providing our web application service,
essentially the web page that we want to see.
And I've gone ahead and configured the Traffic Manager profile,
as well as the two endpoints that we need
in order to test our theory about
whether we can route our traffic successfully,
even if one of our two endpoints is no longer available.
I'm going to walk you back through
how I did all that and we'll do a quick demonstration
to show you that the endpoint is currently up
and when we fail it over how it still provides capabilities
and gives us access to our web content without missing a beat.
So let's go ahead and let's just take a look at what I did.
I'm in the Traffic Manager,
about to go into the Traffic Manager Resource Group,
the first of the two that I've built out.
And what we'll see over here is that I have a web application,
the app service called Eastweb.
It's just a very simple web app
that provides a default web page. Nothing fancy.
I've got the backend monitoring
and the app service plan capabilities all associated with it.
We created that using a separate wizard.
You'll see the same thing is there
in the other Traffic Manager Resource Group.
It's simply labeled west as opposed to Eastweb.
And then below that, highlighted, is our Traffic Manager Profile.
I've gone ahead and created that separately
by using the add capability in the Resource Group.
Go to the marketplace and searching for Traffic Manager.
And I find the Traffic Manager Profile element.
I've chosen to create that and I want to take you in
and show you what goes on as we do that.
So we're going to highlight this
and we're just going to simply click to select it.
And when I do that, I've got the Traffic Manager Profile set up
and we've got our settings area.
I'm on the Traffic View, we get to see some overview material.
And when I look at Endpoints, I see those two Endpoints
that are over there on the right
labeled endpoint east and endpoint west.
Notice both are enabled.
Notice the monitor status for both is set to Online.
And what I want to do
before we delve into this is just go back here, one step.
I'm going to go back to my Resource Groups.
I'm going to go to my Traffic Manager West resource group
and I'm going to show you what it looks like
to create that Traffic Manager Profile.
We're going to go Browse.
I'm going to go and start typing in Traffic Manager
and not even get that far.
And you'll see as I type traffic, I get Traffic Manager Profile.
This is the element, the object that I want to create.
We simply use our Create option directly
from the interface here.
And we're given a very simple
five or six-question form we have to fill out.
We do need to provide a unique name
within the namespace trafficmanager.net
that is globally across the entire Azure fabric
anywhere in the world.
That name in front of trafficmanager.net has to be unique.
So we want to make sure that that is the case.
We put in a unique name, whatever it will be.
We got a green check that will make sure that it is unique.
Let's use our routing method.
There are several options there.
Performance is the default.
Let's just put in a name there to get that to be unique.
We do see our green check.
We look at our routing methods
and we could see we have Performance,
Weighted, Priority, Geographic, Subnet.
The details around all this
and how you would understand more about this
or something you can take a look at over at ITProTV
if you want to learn more about it with me.
Come over, hang out with me,
and I'll walk you through how to do all this in-depth
and explain in more detail
what these different routing methods may imply.
But for now, we just went ahead and chose Priority,
which is what I talked about at the lightboard
as we talked about our primary
and perhaps our secondary or failover area that we would use.
So that's what our priority method would be.
We have our Subscription, we have our Resource Group.
We specify either a default name or create a new one.
And we see the resource group location.
So I've done all this.
I've clicked the create button down below here,
takes about a minute,
and then we do have our Traffic Manager Profile,
which we're working with right now
and we're going to go back to.
I've created the web app separately.
We're not worried about how to do that right now.
But again, I certainly give you that level of detail
when I go through this
in more than one of my courses over at ITProTV.
And you could certainly watch me do it there if you would like.
When we come back over here
and we choose our endpoints from our Traffic Manager Profile,
we have to add them in because our endpoints represent
where we are going to provide the service
that we actually want to potentially load balance
and have the Traffic Manager interact with
and provide access to the Azure East and Azure West blocks
on the right-hand side of lightboard,
as I was explaining how this would all work,
where our web application firewall
and our web app service would be located.
That's the web application that I've created
that you saw at the heart of the Resource Group.
And I've simply added in the endpoints here,
labeling one east and west,
associating each of my web applications with one of them.
And I've made sure they're both online and enabled,
and I use the Add button right there to do that.
When I do that, I do have to provide answers to,
again, some relatively basic questions here.
What type of Azure endpoint
or what type of endpoint am I adding?
I'm using an Azure endpoint, I give it a unique name,
I specify the target resource type.
Is it a cloud service, an app service, things like that?
Then the Target Resource,
I choose the appropriate resource based on the resource type.
I specify a Priority.
That's that rating or ranking that I suggested
that would let me designate the primary
versus the secondary or failover instance.
In our example, we're using a primary rating of one,
a secondary rating of two.
So I have two endpoints
and I've given each one of them a rating or priority scale.
And then I simply click Add at the bottom.
And when I do that, they're both created, both brought online.
And you could see the priority rating
one and two is there respectively.
What that tells us is that Endpoint East
is our primary endpoint,
providing access to our web application back end,
and Endpoint West is our secondary or failover instance.
Now the other thing that I've done
is gone to the Overview element right here at the top
and on the summary area,
I've grabbed the DNS name that you see right there,
which is how I can access the Traffic Manager.
That is essentially the front end publicly available interface
that I want to use.
I've copied that just by clicking Copy to the Keyboard,
Copy to the Clipboard, excuse me, as I just did.
And I've gone ahead and I've pasted that,
as you can see right here, into a web browser.
And I brought that up and I'm looking at my Traffic Manager.
And I can see the web page.
And my web app is providing just this generic web page.
And it's up and running.
And if I hit refresh, it stays there.
It's good, everything is great.
In order to test the failover,
what I have to do is go into my Endpoints.
Let's go back down here.
And I have to go to the primary endpoint.
I'm going to highlight it, click on it.
And I'm going to go in and I'm going to disable it.
I'm going to change that enabled status to Disabled
and save that status change.
That is going to take that offline.
And remember that was the endpoint
that was providing that webpage
that we just looked at right there.
I do see that the status on that has been saved,
and therefore it is now offline.
It says Disabled.
And as a result, it's no longer providing me that webpage.
That status, in other words, we can see has changed.
But what should happen immediately
is Endpoint West should be available and should step right in
and provide continued access to that webpage.
So what we're going to do is open up a browser,
type in our address again.
And sure enough, there is our webpage.
And we can see that it's still available.
And as a result, our failover status, our secondary endpoint,
has stepped right up and Traffic Manager simply rerouted
our traffic request over there.
And without missing a beat, our service stays available,
our customers are happy,
and you don't have to worry about responding to an incident
that could have been avoided
by simply deploying this technology and using it smartly.
We'll continue to take a look at new innovative and interesting,
as well as important, Azure services for you to be familiar with.
That's what the Azure series is all about,
and that's the value of spending time with me.
You get to find out all about them
and get the answers to the what, the how,
and of course, the why.
I'm going to wish you happy Azuring,
and I'm going to be back with more episodes.
And make sure you keep coming back to check us out here.
And also check me out over at ITProTV
if you want more in-depth discussions about this
or any of the Azure content we always highlight here in a serial.
I'll see you soon.