Microsoft Azure - Traffic Manager

Let us first understand what is the service provided by Azure traffic manager. Basically, this service balances the traffic load of services hosted in Azure. The routing policy is defined by the client and traffic to the services hosted in Azure is redirected according to set policies. Traffic manager is a DNS-based service. Thus, it will improve the availability and performance applications.
Let’s see how to create and configure traffic manager in Azure.

Create Traffic Manager

Step 1 − Login to Azure management portal and click ‘New’ at the bottom left corner.
Step 2 − Select Network Services → Traffic Manager → Quick Create.
Create Traffic Manager
Step 3 − Enter the DNS prefix and select the Load Balancing Method.
There are three options in this dropdown.
  • Performance − This option is ideal when you have endpoints in two different locations. When a DNS is requested, it is redirected to the region closest to the user.
  • Round Robin − This option is ideal when you want to distribute the traffic among multiple endpoints. Traffic is distributed in round robin fashion by selecting a healthy endpoint.
  • Failover − In this option, a primary access point is set up, but in case of failure alternate endpoints are made available as backup.
Step 4 − Based on your needs you can choose a load balancing method. Let’s choose performance here.
Step 5 − Click create.
You will see the traffic manager created and displayed in your management portal. Its status will be inactive until it is configured.
Traffic Manager Status

Create Endpoints to be Monitored via Traffic Manager

Step 1 − Select the ‘Traffic Manager’ from the left panel in the management portal that you want to work on.
Step 2 − Select ‘Endpoints’ from the top horizontal menu as shown in the following image. Then select ‘Add Endpoints’.
Endpoints Traffic Manager
Step 3 − The screen shown in the following image will appear. Choose the service type and items under that service will be listed.
Step 4 − Select the service endpoints and proceed.
Endpoints Traffic Manager
Step 5 − The service endpoints will be provisioned.
You can see that in this case, the service ‘tutorialsPointVM’ created in Azure will now be monitored by the traffic manager and its traffic will be redirected according to the specified policy.

Configure the Policy

Step 1 − Click on ‘Configure’ in the top menu bar as shown in the following image.
Step 2 − Enter the DNS Time to Live (TIL). It is the amount of time for which a client/user will continue to use a particular endpoint. For example, if you enter 40 seconds the traffic manager will be queried after every 40 seconds for the changes in the traffic management system.
Configure the Policy
Step 3 − You can change the load balancing method here by choosing a desired method from the dropdown. Here, let’s choose ‘Performance’ as chosen earlier.
Load Balancing Settings
Step 4 − If you scroll down, you will see heading ‘Monitoring Setting’. You can choose the protocol; enter port number and relative path for a service to be monitored.

No comments:

Post a Comment

How to register multiple implementations of the same interface in Asp.Net Core?

 Problem: I have services that are derived from the same interface. public interface IService { } public class ServiceA : IService { ...