Traffic Manager

Traffic Manager is a DNS-based load distribution system designed to load balance traffic over a number of geographic locations.

Concepts

  • Profiles comprise a profile name (something.trafficmanager.net), a routing method and a number of endpoints. You create a CNAME record from your domain to the TM profile, and it provides the appropriate endpoint records based on its configured routing method and the status of the endpoints.
  • Endpoints are individual backends to which clients can be directed.
  • Routing methods determine how TM distributes traffic across the endpoints:
    • Priority provides failover in the form of hot standby, sending all traffic to the primary unless it's unavailable.
    • Weighted distributes traffic across all endpoints evenly or using defined weighting values.
    • Performance directs clients to the "closest" endpoint based on latency.
    • Geographic allows isolation of clients by country, useful for regulatory reasons.
    • Multi-value returns all healthy IPv4 or IPv6 endpoints for all requests.
    • Subnet allows mapping specific client IP address ranges to specific endpoints.

Nested profiles

Traffic Manager profiles can be nested to allow complex decisions to be made, but note that doing so introduces an additional DNS resolution step and may harm performance.

Monitoring

Observability can be achieved through:

  • Endpoint monitoring which provides health probes against endpoints.
  • Real User Measurements track client-side latency via a JavaScript snippet deployed to the application.
  • Traffic View allows us to identify sources of client traffic against a world map.

Use for private endpoints

Whilst not an officially supported workflow (as health probes come from unpredictable addresses), there are a couple of recipes for making this work:

This can be useful for regional storage deployments where it may be desirable to keep a replica in a different region.


Backlinks