Azure Visitors Supervisor
Azure Visitors Supervisor
- Azure Visitors Supervisor is a DNS-based visitors load balancer and distributes visitors to public-facing purposes throughout the international Azure areas.
- Visitors Supervisor makes use of DNS to direct shopper requests to essentially the most applicable service endpoint primarily based on a traffic-routing methodology and the well being of the endpoints.
- An endpoint is any Web-facing service hosted inside or exterior of Azure. It offers a variety of traffic-routing strategies and endpoint monitoring choices to go well with completely different utility wants and automated failover fashions.
- Visitors Supervisor shouldn’t be a region-based useful resource.
- The next visitors routing strategies can be found within the Visitors Supervisor,
- Precedence – If you choose “Precedence” then, major service endpoint shall be used for all visitors, and supply backups in case the first or the backup endpoints are unavailable.
- Weighted – If you wish to distribute visitors throughout a set of endpoints then Choose “Weighted”. The visitors shall be distributed both evenly or in accordance with weights outlined within the endpoints.
- Efficiency – If you choose “Efficiency” then the “closest” endpoint (when it comes to the bottom community latency) shall be used. You probably have endpoints in numerous geographic areas then you possibly can go for this routing methodology.
- Geographic – If a area or a set of areas is assigned to an endpoint then customers are directed to particular endpoints primarily based on which geographic location their DNS question originates from.
- Multivalue – In case you solely have IPv4/IPv6 addresses as endpoints then choose “MultiValue” for Visitors Supervisor profiles. When a request is obtained for this profile, all wholesome endpoints are returned.
- Subnet – Choose the Subnet routing methodology to map units of end-user IP tackle ranges to a selected endpoint. When a request is obtained, the endpoint is predicated on mapped the request’s supply IP tackle.
How Visitors Supervisor works
- The shopper sends a DNS question to its configured DNS service to resolve the identify www.take a look at.com.
- To resolve the DNS identify, the DNS service finds the identify servers for the take a look at.com area. The take a look at.com DNS servers return the CNAME document that factors to check.trafficmanager.internet.
- DNS service finds the identify servers for the trafficmanager.internet area, that are offered by the Azure Visitors Supervisor service. It then sends a request for the take a look at.trafficmanager.internet DNS document to these DNS servers.
- The Visitors Supervisor identify servers obtain the request. The visitors supervisor returns an endpoint primarily based on,
- The configured state of every endpoint (disabled endpoints should not returned)
- The present well being of every endpoint, as decided by the Visitors Supervisor well being checks.
- The chosen traffic-routing methodology
- The chosen endpoint is returned as one other DNS CNAME document. For instance, test-eu.app.internet is returned.
- The DNS service finds the identify servers for the app.internet area. It contacts these identify servers to request the test-eu.app.internet DNS document. A DNS ‘A’ document containing the IP tackle of the EU-based service endpoint is returned.
- The DNS service consolidates the outcomes and returns a single DNS response to the shopper.
- The shopper receives the DNS outcomes and connects to the given IP tackle. The shopper connects to the appliance service endpoint instantly, not by Visitors Supervisor. Since it’s an HTTPS endpoint, the shopper performs the required SSL/TLS handshake, after which makes a request for the web page.
- We’re going to create two Net apps (one internet app within the South India area and one other internet app within the West Europe area) for demo functions contained in the App service in azure. These Net apps have simply static internet pages.
- Create Visitors Supervisor Profile with routing methodology is “Efficiency”.
- Connect the above two internet apps endpoint to visitors supervisor profile.
- Hit the Visitors Supervisor Profile URL and test the way it behaves.
Right here we’re configuring the under assets for demo functions.
- App Companies (Net Apps)
- Visitors Supervisor
Create Net Apps
Choose “App Companies” on Dwelling Web page or Choose “Create Useful resource” and choose “App Companies”.
As soon as navigated to the “App Companies” web page, click on the “Add” button.
The “Create Net App” web page will open and enter the values. For Useful resource Group choose the present useful resource group or if you wish to create a brand new one-click the “Create new” hyperlink under the dropdown. I’ve chosen the present Useful resource group and the Net App identify is “Take a look at-India”, the area is “South India” and App Service Plan is “Customary Service Plan(S1)” and click on the “Evaluate + Create” button.
Visitors Supervisor works with Net Apps with minimal App Service Plan is “Customary Service Plan(S1)”.
Please test the app service plans within the hyperlink.
Evaluate the information which you enter and click on the “Create” button.
The “Take a look at-India” internet app has been created. You possibly can see it beneath the “App Companies” Web page.
Click on the “Take a look at-India“ and the corresponding internet app web page will open. The URL is the precise URL the place the net app has been hosted.
In case you click on the above URL then the net utility will open. It has a easy default HTML web page as under.
To make differentiate two internet apps, we’re going to edit the HTML web page. Click on the “Superior Instruments” menu within the left panel and click on the “Go” hyperlink on the “Superior Instruments” web page.
The under web page shall be open. As an alternative of the above step, you possibly can open this web page by appending the “.scm” within the Net App URL (earlier than .azurewebsites.internet).
For instance, right here Net app URL is https://test-india.azurewebsites.internet so the Superior Instruments URL shall be https://test-india.scm.azurewebsites.internet ,
On this web page, navigate to Debug console -> PowerShell.
The under web page will open. Click on the “website” folder.
The under web page will open. Click on “wwwroot” folder.
You possibly can see the “hostingstart.html” file. We’re going to edit this HTML file. Click on the “Edit” button (“Pencil” icon) on left.
The “hostingstart.html” file will open. It has easy HTML code. Simply exchange with the under code within the file and click on the “Save” button.
<!DOCTYPE html> <html> <head> </head> <physique> <h1><b type="shade:crimson;">Hello !!!!!</b></h1> <h1><b type="shade:crimson;">I'm from India</b></h1> </physique> </html>
Now open the “Take a look at-India” internet app URL (https://test-india.azurewebsites.internet). You possibly can see the below-modified content material.
Identical as above, create one other Net App known as “Take a look at-Europe” the place the area is “West Europe”. Modify the “Take a look at-Europe” HTML file with the under code and test the URL. You possibly can see the under web page.
<!DOCTYPE html> <html> <head> </head> <physique> <h1><b type="shade:crimson;">Hello !!!!!</b></h1> <h1><b type="shade:crimson;">I'm from Europe</b></h1> </physique> </html>
Create Visitors Supervisor Profile
Click on the “Visitors Supervisor profiles” on Dwelling Web page or Choose “Create Useful resource” and choose “Visitors Handle profiles”.
Click on the “Create” button on the “Visitors Supervisor profiles” web page.
Enter the values. Right here I’ve given the Routing methodology is “Efficiency” and click on the “Create” button.
The “TM-Take a look at-Demo” Visitors Supervisor profile has been created. You possibly can see this on the “Visitors Supervisor profiles” Web page.
Click on the “TM-Take a look at-Demo” and the corresponding visitors supervisor web page will open. Within the under, the Routing methodology is “Efficiency” and the DNS identify is the URL(http://tm-test-demo.trafficmanager.internet/) of the Visitors supervisor.
Click on the “Endpoints” within the left panel and click on “Add” however so as to add an endpoint to the visitors supervisor.
Choose the values. Right here Kind is “Azure endpoint”, the goal useful resource sort is “App service” and choose goal useful resource “Take a look at-India” (First Net App) and click on “Add”.
Identical as above, Add one other Net App (“Take a look at-Europe”).
Hit the Visitors Supervisor URL (DNS Identify – http://tm-test-demo.trafficmanager.internet/). Right here, I’m from India. The Visitors Supervisor routing methodology is “Efficiency”(It picks the endpoint with low latency). So “Take a look at-India” Net App endpoint has been picked by Visitors Supervisor and the corresponding internet web page has been rendered.
For Testing with completely different areas, I’ve used “https://www.geoscreenshot.com/”. GeoScreenshot lets seize webpage from completely different geographic areas. Right here, entered the Visitors Supervisor URL and chosen the random areas, and clicked the “Seize” button. You possibly can see the net web page, from completely different areas. Right here the areas are India (IN), Canada (CA), United Kingdom (GB), Germany (DE). The completely different areas have completely different internet apps as a result of the visitors supervisor returns the endpoint primarily based on the supply location(which has much less latency).
For Canada (CA), United Kingdom (GB), Germany (DE), the Visitors supervisor returns the “Take a look at-Europe” Net app endpoint.
For India (IN), the Visitors supervisor returns the “Take a look at-India” Net app endpoint.
That is how the visitors supervisor has returned the endpoints primarily based on the routing methodology. You possibly can strive with completely different routing strategies the identical because the above steps and test how visitors supervisor works.
In real-time, customers will not hit the visitors supervisor URL instantly. Visitors supervisor URL shall be added within the DNS service(Please see How Visitors Supervisor works diagram in above).
I hope you appreciated the article and know the essential information about Azure Visitors Supervisor. You probably have any doubts or feedback about this, please let me know within the feedback.
Preserve Studying!!!! Pleased Coding!!!!