Happy new year folks , hope 2021 will be better year for all us. Its been a while since my last blog , held up with some projects at work and was busy preparing for GCP — Professional architect exam and yes cleared it Yay !!!!.
In this blog , we will discuss about Azure Traffic manager and how it works with some cool examples.
Introduction to Traffic Manager
Traffic manager allows users to control distribution of network/user traffic to the end-points running in different datacenters around the world , Traffic manager does that by directing the end-user request to the most appropriate end-point .
appropriate ??!
Region which is closest to the end-users .
Traffic manager supports various end-points that includes — Azure VMs , web-apps and other cloud services. Another cool thing about traffic manager is that you can host your application in on-premise or in other cloud traffic manager will still direct the traffic to that web-application.
Different Routing Method
There are different ways , Traffic manager can be configured to meet various use cases using below mentioned traffic manager types —
- Priority Routing — Consider an organization has multiple end-points , the traffic should always go to one end-point at all time and if in case the the Primary end-point is down the traffic should be routed to the next end-point in the region. This is useful for organizations who wants to provide reliable service to their end customers.
The traffic manager profile contains prioritized list of end-points as shown below.
2. Performance Routing — Consider an organization has multiple end-points running from different regions (E.g.- East US , West US , East Asia) and the organization would always want the users to get routed to the nearest end-datacenter (end-point) with best responsiveness. Traffic manager identifies the nearest datacenter by measuring the latency of each region with low latency.
Geographic Routing — When a traffic manager profile is configured for Geographic routing , each end-point associated will have set of geo-location associated with it as shown below .
E.g.: Endpoint 1 — If a traffic comes from East US , it should get routed to EAST US endpoint only
Endpoint 2 —If the traffic comes from India or Singapore it should go to one of the prioritized end-points in nested profile.
Weighted Routing — At time you may have multiple end-points for a website and those may be associated with different regions . You may want to do weighted routing to each region or gradually increase the load to a specific end-point.
E.g. : Both Region 1 and Region 2 will receive only 50% traffic each and if customer wants to test new website they can just 5% to receive only minimum user traffic.
Why Traffic Manager
Lets imagine company abc has customers across the globe , some are in the USA and some are in South East Asia (SEA) and the company is running a website in US Datacenter.
With the current setup , the customers in the USA see very low latency as they are in the same geographical location while SEA customers might experience relatively higher latency.
NOTE : Load balancers are region specific , hence they cannot solve the above mentioned use case.
Multiple end-points
Here is the situation now — How to reduce the latency for SEA customers , Lets create one more end-point for SEA customers , the idea here is “the SEA customers should go to SEA end-point” and “US customer should go to US end-point”. Now , both of this regions should see less latency.
Here comes the function of Traffic Manager
If multiple end-points are created then we also need URL’s for each end-point. For the above representation we need two end-points “one for USA and one for SEA”. Is it scalable hmmm….. no right
Company abc is a global company , requesting customers to use different URLs based on their region is not a scalable solution . We need one URL for the website no matter from where customers connect they should get connected with the nearest end-point based on their region and thus reduce latency.
How Performance Traffic Manager works
Now that we know , Traffic manager does DNS routing , what it means is it does URL to IP address mapping . When customer opens the URL (Eg : https://abc.com) it will resolve based on the routing mechanism set for this example lets consider “Performance based routing” .
Example:
In performance based routing , traffic manager creates a “IP latency table ,which maintains a latency for each region” .
If a query is coming from a U.S customer , Traffic manager check the IP latency table and resolves the public IP of U.S end-point as it provides best performance (low latency ) for U.S customers.
Traffic manager will only resolve to the best performing end-point , the actual HTTP/HTTPs data traffic flows between customer system to end-point directly
Hope you liked it , I will catch up with you folks soon with some other interesting topic . Take care and stay safe!!
Follow me on : https:https://www.linkedin.com/in/kesavanp/