I have a virtual scale set in Azure and I want to add the public IP of these instances to my traffic manager endpoint. My use case is that I want to create A record of these instances in my dns zones. I want to balance the load between these instances using round robin so that's why I have brought traffic manager to the picture. So now in my dns zone I have a record set and created a alias which points to my azure traffic manager. Now I want to add the public IP of these instances to my azure traffic manager endpoint that is whenever a new instance is added or removed it gets automatically added to my traffic manager profile. How can I do this?
1 Answers
If you mean the public IP address of the VMSS instance is like this:
you can not add this public IP address as the traffic manager endpoint because it is not a separate resource (public Ip resource) in the Azure portal. See supported Azure resource types for Azure endpoints.
The traffic manager mainly works at the DNS level, if don't consider VMSS, you can create multiple VMs with each Public IP addresses attached, then you can add these public IP address resources to the TM endpoints.
However, In my opinion, Azure Traffic Manager is better to enable you to distribute traffic optimally to services across global Azure regions. For regional service 4 layer LB, you can just use Azure load balancer to balance the load between these instances of VMSS using round-robin. You only need to associate the VMSS with a public load balancer, then you can balance these instances with LB rules and access backend instances via LB frontend public IP. Read Azure Load Balancer with Azure virtual machine scale sets for more details.

- 26,865
- 3
- 18
- 34
-
Hi, So my use case is that I have mapped a dns record set in dns zone and I have created a alias which points to my traffic manager profile and in my traffic manager profile I want to add the IPs of my virtual scale set instances as endpoints so that whenever it gets scaled in and scaled out the IPs of instances get automatically configured as endpoints of traffic manager profile.I want to balance the load at dns level only.Any way I can do this? – Anshul Walia Oct 23 '20 at 10:19
-
It's impossible to directly add the instance IP to the endpoints of TM. You need to add a public LB in front of your virtual scale set instances, refer to [this](https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/quick-create-portal#create-a-load-balancer), then you could add the public IP of LB into your traffic manager endpoint. The traffic flow will be from TM---LB public IP----load balancing backend VM instances. Or you can replace the VM scale sets with multiple separate VMs, then you can attach each VM's public IP. – Nancy Oct 26 '20 at 09:24