Traffic manager and its child endpoint resource enable DNS routing to endpoints in Azure and outside of Azure. Such traffic distribution is governed by routing policy methods. Traffic manager also allows endpoint health to be monitored, and traffic diverted appropriately based on the health of an endpoint.
Property | Description |
---|---|
trafficRoutingMethod | possible values are Performance, Weighted, and Priority |
dnsConfig | FQDN for the profile |
Protocol | monitoring protocol, possible values are HTTP and HTTPS |
Port | monitoring port |
Path | monitoring path |
Endpoints | container for endpoint resources |
An endpoint is a child resource of a Traffic Manager Profile. It represents a service or web endpoint to which user traffic is distributed based on the configured policy in the Traffic Manager Profile resource.
Property | Description |
---|---|
Type | the type of the endpoint, possible values are Azure End point, External Endpoint, and Nested Endpoint |
targetResourceId | public IP address of a service or web endpoint. This can be an Azure or external endpoint. |
Weight | endpoint weight used in traffic management. |
Priority | priority of the endpoint, used to define a failover action |
Sample of Traffic Manager in Json format:
{
"apiVersion": "[variables('tmApiVersion')]",
"type": "Microsoft.Network/trafficManagerProfiles",
"name": "VMEndpointExample",
"location": "global",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'), '0')]",
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'), '1')]",
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'), '2')]",
],
"properties": {
"profileStatus": "Enabled",
"trafficRoutingMethod": "Weighted",
"dnsConfig": {
"relativeName": "[parameters('dnsname')]",
"ttl": 30
},
"monitorConfig": {
"protocol": "http",
"port": 80,
"path": "/"
},
"endpoints": [
{
"name": "endpoint0",
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
"properties": {
"targetResourceId": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'), 0))]",
"endpointStatus": "Enabled",
"weight": 1
}
},
{
"name": "endpoint1",
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
"properties": {
"targetResourceId": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'), 1))]",
"endpointStatus": "Enabled",
"weight": 1
}
},
{
"name": "endpoint2",
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
"properties": {
"targetResourceId": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'), 2))]",
"endpointStatus": "Enabled",
"weight": 1
}
}
]
}
}
Read REST API documentation for Traffic Manager for more information.