Traffic manager with the charm of Microsoft public cloud

Source: Internet
Author: User

In the previous blog, I briefly talked about azure's websites service. Websites can support multi-instance extension and achieve load balancing, in addition, cloud services such as azure's Virtual Machine services are also in the form of load balancing. in azure, apart from these built-in Load Balancing functions, A service called traffic manager is also released separately. Why is this traffic manager used?

 

The official description of Microsoft is as follows:

"With azure traffic manager, you can control the distribution of user traffic to a specified endpoint (which may include azure cloud services, websites, and Other endpoints. The working principle of traffic manager is to apply the intelligent policy engine to the Domain Name System (DNS) query performed on Internet Resource domain names. Azure cloud services or websites can run in different data centers around the world ."

 

We can see that traffic manager is a traffic-oriented load balancing service. What is the difference between it and traditional NLB? Take a look at the following scenarios:

    1. Your services are deployed in "Northern China" and "Eastern China" at the same time. If you want the North to serve as an active site, standby is used in the east.

    2. User Services are deployed in "Northern China" and "Eastern China" at the same time. Users in Inner Mongolia are expected to obtain data from the northern region when they access the application, while customers in Zhejiang obtain data from the eastern region when they access the application.

    3. The user's service colleagues are deployed in "Northern China" and "Eastern China", hoping that the data centers in two locations will receive round-robin responses wherever the customer accesses the application.

I believe that the traditional NLB is not suitable for the above three scenarios, and traffic manager solves this requirement. Its working mechanism is roughly as follows:

 

First, you need to create a traffic manager domain name (unique valid) in azure, and then bind the alias (cname) through the carrier ), after that, the customer's DNS request for the original domain name will be directed to the traffic manager domain name, and then processed based on the specific Configuration Policy of the traffic manger, whether it is based on performance, round robin, or failover:

650) This. width = 650; "Title =" ic758193.jpg "src =" http://s3.51cto.com/wyfs02/M00/4D/3A/wKioL1RN7dOyQA5zAAGkfpb-r0g230.jpg "alt =" wKioL1RN7dOyQA5zAAGkfpb-r0g230.jpg "/>

######################################## ############################

Traffic manager is a branch of the network service. After logging on to the portal, you can quickly create a traffic manager service, enter a unique valid DNS domain name and load balancing method (this example uses the "performance" method and can be modified after creation), for example:

650) This. width = 650; "Title =" 2014-10-23_23-26-59.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M00/4D/3A/wKioL1RN5-uAZCbEAAIlVIP-mZ8922.jpg "alt =" wKioL1RN5-uAZCbEAAIlVIP-mZ8922.jpg "/>

I created a domain name named "xieruitraffic01". After Entering the domain name, I can click Configure. On the configuration page, I can see three load balancing methods:

650) This. width = 650; "Title =" 2014-10-23_23-29-08.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M00/4D/39/wKiom1RN55jg1lIgAAMVswL9TRU141.jpg "alt =" wkiom1rn55jg1ligaamvswl9tru141.jpg "/>

In addition, you can select the protocol, port, or relative path for load balancing:

650) This. width = 650; "Title =" 2014-10-23_23-29-47.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M01/4D/3A/wKioL1RN5-2D1n9qAAJSJawihhM211.jpg "alt =" wKioL1RN5-2D1n9qAAJSJawihhM211.jpg "/>

After the configuration file is configured, add the endpoint. The endpoint is the resource you want to achieve load balancing, for example:

650) This. width = 650; "Title =" 2014-10-23_23-30-17.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M01/4D/39/wKiom1RN55ny5r6IAAH2LwXWoWM100.jpg "alt =" wkiom1rn55ny5r6iaah2lwxwowm100.jpg "/>

There are many types of services, such as website and cloudservice. Taking website as an example, I added the two sites created in the previous blog as endpoints, and xieruitest02 is in the East, and xieruitest01 is in the north, we can also see a warning: "Only standard-mode Website Supports traffic manager. In addition, each region corresponds to only one website"

650) This. width = 650; "Title =" 2014-10-23_23-32-42.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M02/4D/3A/wKioL1RN5--ROMMyAAJ38d_REhE906.jpg "alt =" wKioL1RN5--ROMMyAAJ38d_REhE906.jpg "/>

After adding the endpoint, the two endpoints are online, for example:

650) This. width = 650; "Title =" 2014-10-23_23-45-14.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M01/4D/39/wKiom1RN55vhWe9IAAIbKLYR9hI434.jpg "alt =" wkiom1rn55vhwe9iaaibklyr9hi434.jpg "/>

On the traffic manager homepage, you can view its URL and copy it for test access:

650) This. width = 650; "Title =" 2014-10-23_23-46-55.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M02/4D/3A/wKioL1RN5_DwvwmBAAIreH9Q5sg799.jpg "alt =" wkiol1rn5_dwvwmbaaireh9q5sg799.jpg "/>

View the website as the "endpoint". The DNS link of the traffic manager is automatically added under the domain name attribute:

650) This. width = 650; "Title =" 2014-10-23_23-55-52.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M02/4D/39/wKiom1RN55zywinOAAJVHuOFUf0274.jpg "alt =" wkiom1rn55zywinoaajvhuofuf0274.jpg "/>

Take my personal computer as an example. My physical location is in Beijing and NSLookup is used to query the Domain Name of the traffic manager. If the returned results are the same for multiple times, the IP address 61.50.248.117 is used, for example:

650) This. width = 650; "Title =" 2014-10-23_23-58-41.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M00/4D/3A/wKioL1RN5_DTjYD3AAONuF6mPk0783.jpg "alt =" wkiol1rn5_dtjyd3aaonuf6mpk0783.jpg "/>

Query an IP address in Beijing, for example:

650) This. width = 650; "Title =" 2014-10-24_0-00-55.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M00/4D/39/wKiom1RN553jLEaWAAURziou4Ro516.jpg "alt =" wkiom1rn553jleawaaurziou4ro516.jpg "/>

To further verify the validity of the traffic manager, I am looking for a virtual machine in northern China for testing, such:

650) This. width = 650; "Title =" 2014-10-24_0-03-44.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M01/4D/39/wKiom1RN552hb9qZAAJ2TSN8wDw492.jpg "alt =" wkiom1rn552hb9qzaaj2tsn8wdw492.jpg "/>

Use this virtual machine to access xieruitraffic01.trafficmanager.cn. The only website in northern China, that is, xieruitest01, is returned)

650) This. width = 650; "Title =" 2014-10-24_0-04-20.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M02/4D/3A/wKioL1RN5_Sig2k-AATiaWQdu1o315.jpg "alt =" wKioL1RN5_Sig2k-AATiaWQdu1o315.jpg "/>

At this time, I will create another VM in eastern China to test it, for example:

650) This. width = 650; "Title =" 2014-10-24_0-16-01.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M02/4D/39/wKiom1RN56CzNcK2AAJbN4aNXWw403.jpg "alt =" wkiom1rn56cznck2aajbn4anxww403.jpg "/>

After the creation is complete, log on to this virtual machine located in the east:

650) This. width = 650; "Title =" 2014-10-24_0-43-58.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M00/4D/3A/wKioL1RN5_WAEaexAAJBEotb9nQ623.jpg "alt =" wkiol1rn5_waeaexaajbeotb9nq623.jpg "/>

Similarly, when you access the link xieruitraffic01.trafficmanager.cn, the returned website is located in eastern China, that is, xieruitest02. It is also the node. js website deployed in the previous blog, for example:

650) This. width = 650; "Title =" 2014-10-24_0-47-08.png "style =" float: none; "src =" http://s3.51cto.com/wyfs02/M00/4D/39/wKiom1RN56GC_qZIAAPZNzKHyvk547.jpg "alt =" wkiom1rn56gc_qziaapznzkhyvk547.jpg "/>

######################################## ##############################

From the above practice, we can see that traffic manger has achieved the expected results. So what is the operating principle of traffic manger based on the performance method? See:

650) This. width = 650; "Title =" ic758158.jpg "src =" http://s3.51cto.com/wyfs02/M02/4D/3A/wKiom1RN9vfzOg_vAAFLgbuSMmY048.jpg "alt =" wkiom1rn9vfzog_vaaflgbusmmy048.jpg "/>

Azure maintains a performance table that records the response time between different data centers and endpoints. When a user query request is received, select an optimal entry to return to DNS and notify the client to parse the query result in sequence.

This article from the "technology don't house" blog, please be sure to keep this source http://maomaostyle.blog.51cto.com/2220531/1568489

Traffic manager with the charm of Microsoft public cloud

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.