{"id":21182,"date":"2018-06-05T13:55:00","date_gmt":"2018-06-05T12:55:00","guid":{"rendered":"https:\/\/aidanfinn.com\/?p=21182"},"modified":"2018-05-31T11:58:10","modified_gmt":"2018-05-31T10:58:10","slug":"azure-traffic-manager-geography-versus-latency","status":"publish","type":"post","link":"https:\/\/aidanfinn.com\/?p=21182","title":{"rendered":"Azure Traffic Manager: Geography Versus Latency"},"content":{"rendered":"<p>A recent #AzureTrivia question on Twitter asked how you would configure Azure Traffic Manager to redirect clients to the <em>closest<\/em> endpoint (a place hosting a web application). That question made me go hmm \u2013 how do you define <em>closest<\/em>?<\/p>\n<p><a href=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2018\/05\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"500\" title=\"image\" style=\"border: 0px currentcolor; border-image: none; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;\" alt=\"image\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2018\/05\/image_thumb-14.png\" border=\"0\"><\/a><\/p>\n<h2>Defining Closeness<\/h2>\n<p>Do&nbsp; you measure closeness by kilometres as the crow flies or on the road? Or do you measure closeness by how packets travel across the Internet, from the client to the actual Azure data centre? Here\u2019s a story I tell in my Azure training when talking about this topic.<\/p>\n<p>I once worked for a hosting company in Dublin, Ireland. It was the end of a workday in December and we were all excited because it was the night of our Christmas party. We were going to a restaurant in the city and the MD was paying for everything. Fun times! Sales, engineering, support, etc were in the top floor and we piled down the stairs to the NOC to get the folks who were coming off their shift. A few of us walked into the NOC and the staff were in a bit of a tizzy. A customer, not very far away from us, claimed that we were offline. Earlier that year, we did have a catastrophic outage caused by an electrician\u2019s mistake, so we were a bit touchy about things like this. Straight away, us engineers ran back upstairs and started doing tests. The networking guys quickly verified that we were actually online, but the customer was adamant. NOC got the customer (in Ireland, remember) to run a tracert. We quickly found that the customer\u2019s ISP connected to the rest of the Internet in Germany, and that there was a router fault in Germany that was nothing to do with us \u2013 there was an infinite loop and packets were timing out.<\/p>\n<p><a href=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2018\/05\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"557\" title=\"image\" style=\"border: 0px currentcolor; border-image: none; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;\" alt=\"image\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2018\/05\/image_thumb-13.png\" border=\"0\"><\/a><\/p>\n<p>So this customer, only a few kilometres from us, was connected to the rest of the world through Germany. We were geographically close to the customer, but in terms of latency, the customer could have had a \u201ccloser\u201d hosting company in Germany. When you use a phrase such as \u201cclosest\u201d in networking, that typically means latency, and is nothing to do with an atlas or map book.<\/p>\n<h2>Controlling Traffic Manager<\/h2>\n<p>Traffic Manager is a DNS redirection Azure feature for services running across multiple Azure\/other locations. The redirection of each Traffic Manager profile works in one of 4 ways:<\/p>\n<ul>\n<li><strong>Priority<\/strong>: You can think of this as a failover method. Traffic goes to endpoint 1, if that fails it goes to endpoint 2. If endpoint 2 fails, it goes to endpoint 3, and so on.<\/li>\n<li><strong>Weighted<\/strong>: This is a weight-based distribution method, i.e. load balancing. You might set one endpoint with a weight of 40 (40% in this case) and two other endpoints each with a weight of 30 (30%).<\/li>\n<li><strong>Performance<\/strong>: I\u2019ll use <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/traffic-manager\/traffic-manager-routing-methods\" target=\"_blank\">Microsoft\u2019s definition<\/a> here \u2026 when you have endpoints in different geographic locations and you want end users to use the &#8220;closest&#8221; endpoint in terms of the lowest network latency.<\/li>\n<li><strong>Geographic<\/strong>: Using <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/traffic-manager\/traffic-manager-routing-methods\" target=\"_blank\">Microsoft\u2019s definition<\/a> again \u2026 users are directed to specific endpoints (Azure, External, or Nested) based on which geographic location their DNS query originates from.<\/li>\n<\/ul>\n<p>So if you want to configure Traffic Manager to send clients to the <em>closest<\/em> Azure region, you use the Performance routing method. <\/p>\n<p>In my above Europe example, I might have a web application running in North Europe (Dublin) and West Europe (Netherlands), unified and abstracted at the DNS level by Traffic Manager. If I set Geographic as the routing method, the customer would normally be sent to North Europe. If I set the routing method as Performance, the customer would normally be sent to West Europe because it is closer in terms of latency.<\/p>\n<h2>Want to Learn More Azure Stuff Like This?<\/h2>\n<p>If you found this information useful, then imagine what 2 days of training might mean to you. I&#8217;m delivering a 2-day course in London on July 5-6, teaching newbies and experienced Azure admins about Azure Infrastructure. There&#8217;ll be lots of in-depth information, covering the foundations, best practices, troubleshooting, and advanced configurations. You can learn more <a href=\"http:\/\/www.cloudmechanix.com\/training-courses\/london2018-07\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p><a href=\"http:\/\/www.cloudmechanix.com\/training-courses\/london2018-07\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-20919\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2018\/05\/LondonAd.png\" alt=\"\" width=\"600\" height=\"318\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A recent #AzureTrivia question on Twitter asked how you would configure Azure Traffic Manager to redirect clients to the closest endpoint (a place hosting a web application). That question made me go hmm \u2013 how do you define closest? Defining Closeness Do&nbsp; you measure closeness by kilometres as the crow flies or on the road? &hellip; <a href=\"https:\/\/aidanfinn.com\/?p=21182\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Azure Traffic Manager: Geography Versus Latency&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":18386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[5],"tags":[170,80,275],"class_list":["post-21182","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure","tag-networking","tag-traffic-manager"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/06\/12809137181.png","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/21182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21182"}],"version-history":[{"count":3,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/21182\/revisions"}],"predecessor-version":[{"id":21187,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/21182\/revisions\/21187"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/media\/18386"}],"wp:attachment":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}