Traffic Manager example client usage
Following on from the deployment example above; when a client requests the page https://partners.contoso.com/login.aspx, the client performs the following steps to resolve the DNS name and establish a connection:
The client sends a DNS query to its configured recursive DNS service to resolve the name 'partners.contoso.com'.
- A recursive DNS service, sometimes called a 'local DNS' service, does not host DNS domains directly.
- Rather, the client off-loads the work of contacting the various authoritative DNS services across the Internet needed to resolve a DNS name.
To resolve the DNS name,
- The recursive DNS service finds the name servers for the 'contoso.com' domain.
- It then contacts those name servers to request the 'partners.contoso.com' DNS record.
- The contoso.com DNS servers return the CNAME record which points to contoso.trafficmanager.net.
Next, the recursive DNS service finds the name servers for the 'trafficmanager.net' domain, which are provided by the Azure Traffic Manager service. It then sends a request for the 'contoso.trafficmanager.net' DNS record to those DNS servers.
The Traffic Manager name servers receive the request. They choose an endpoint based on:
- The configured state of each endpoint (disabled endpoints are not returned)
- The current health of each endpoint, as determined by the Traffic Manager health checks.
- The chosen traffic-routing method.
The chosen endpoint is returned as another DNS CNAME record. In this case, let us suppose contoso-eu.cloudapp.net is returned.
Next, the recursive DNS service finds the name servers for the 'cloudapp.net' domain. It contacts those name servers to request the 'contoso-eu.cloudapp.net' DNS record.
- A DNS 'A' record containing the IP address of the EU-based service endpoint is returned.
The recursive DNS service consolidates the results and returns a single DNS response to the client.
The client receives the DNS results and connects to the given IP address.
- The client connects to the application service endpoint directly, not through Traffic Manager.
- Since it is an HTTPS endpoint, the client performs the necessary SSL/TLS handshake, and then makes an HTTP GET request for the '/login.aspx' page.
- The recursive DNS service caches the DNS responses it receives.
- The DNS resolver on the client device also caches the result.
Caching enables subsequent DNS queries to be answered more quickly by using data from the cache rather than querying other name servers.
The duration of the cache is determined by the 'time-to-live' (TTL) property of each DNS record.
- Shorter values result in faster cache expiry and thus more round-trips to the Traffic Manager name servers.
- Longer values mean that it can take longer to direct traffic away from a failed endpoint.
Traffic Manager allows you to configure the TTL used in Traffic Manager DNS responses to be:
- As low as 0 seconds
- As high as 2,147,483,647 seconds (the maximum range compliant with RFC-1035)