流量管理員的效能考量Performance considerations for Traffic Manager

此頁面說明使用流量管理員的效能考量。This page explains performance considerations using Traffic Manager. 請考慮下列案例:Consider the following scenario:

您在美國東部和東亞區域有網站的執行個體。You have instances of your website in the WestUS and EastAsia regions. 其中一個執行個體在流量管理員探查中健全狀況檢查失敗。One of the instances is failing the health check for the traffic manager probe. 應用程式流量會被導向健全狀況良好的區域。Application traffic is directed to the healthy region. 此容錯移轉是預期中之事,但效能可能是個問題,因為延遲的流量現在要流動到遙遠的區域。This failover is expected but performance can be a problem based on the latency of the traffic now traveling to a distant region.

流量管理員的效能考量Performance considerations for Traffic Manager

流量管理員對您的網站造成的唯一效能影響就是初始 DNS 查閱。The only performance impact that Traffic Manager can have on your website is the initial DNS lookup. 對流量管理員設定檔名稱的 DNS 要求是由裝載 trafficmanager.net 區域的 Microsoft DNS 根伺服器處理。A DNS request for the name of your Traffic Manager profile is handled by the Microsoft DNS root server that hosts the trafficmanager.net zone. 流量管理員會根據流量管理員的原則和探查結果,填入並定期更新 Microsoft 的 DNS 根伺服器。Traffic Manager populates, and regularly updates, the Microsoft's DNS root servers based on the Traffic Manager policy and the probe results. 因此即使在初始 DNS 查閱期間,也不會傳送任何 DNS 查詢給流量管理員。So even during the initial DNS lookup, no DNS queries are sent to Traffic Manager.

流量管理員元件由幾個元件組成︰DNS 名稱伺服器、API 服務、儲存層、端點監視服務。Traffic Manager is made up of several components: DNS name servers, an API service, the storage layer, and an endpoint monitoring service. 如果流量管理員服務元件失敗,對您的流量管理員設定檔相關聯的 DNS 名稱不會有影響。If a Traffic Manager service component fails, there is no effect on the DNS name associated with your Traffic Manager profile. Microsoft DNS 伺服器中的記錄保持不變。The records in the Microsoft DNS servers remain unchanged. 不過,端點監視和 DNS 更新不會發生。However, endpoint monitoring and DNS updating do not happen. 因此,當主要網站關閉時,流量管理員無法將 DNS 更新為指向您的容錯移轉網站。Therefore, Traffic Manager is not able to update DNS to point to your failover site when your primary site goes down.

系統會快速解析 DNS 名稱並快取結果。DNS name resolution is fast and results are cached. 初始 DNS 查閱的速度取決於用戶端用於名稱解析的 DNS 伺服器。The speed of the initial DNS lookup depends on the DNS servers the client uses for name resolution. 一般而言,用戶端可以在大約 50 毫秒內完成 DNS 查閱。Typically, a client can complete a DNS lookup within ~50 ms. 系統會快取查閱的結果用於 DNS 存留時間 (TTL) 的持續時間。The results of the lookup are cached for the duration of the DNS Time-to-live (TTL). 流量管理員的預設 TTL 為 300 秒。The default TTL for Traffic Manager is 300 seconds.

流量不會透過流量管理員流動。Traffic does NOT flow through Traffic Manager. 一旦完成 DNS 查閱,用戶端會有您的網站的執行個體 IP 位址。Once the DNS lookup completes, the client has an IP address for an instance of your web site. 用戶端直接連線到該位址,不會通過流量管理員。The client connects directly to that address and does not pass through Traffic Manager. 您選擇的流量管理員原則並不會影響到 DNS 效能。The Traffic Manager policy you choose has no influence on the DNS performance. 不過,效能路由方法可能對應用程式體驗產生負面影響。However, a Performance routing-method can negatively impact the application experience. 例如,如果您的原則將流量從北美重新導向裝載於亞洲的執行個體,這些工作階段的網路延遲可能是個效能問題。For example, if your policy redirects traffic from North America to an instance hosted in Asia, the network latency for those sessions may be a performance issue.

測試流量管理員效能Measuring Traffic Manager Performance

有幾個網站可幫助您了解效能和流量管理員設定檔的行為。There are several websites you can use to understand the performance and behavior of a Traffic Manager profile. 這些網站其中許多都是免費,但可能有限制。Many of these sites are free but may have limitations. 某些網站提供付費的監視與報告增強功能。Some sites offer enhanced monitoring and reporting for a fee.

這些網站上的工具會測量世界各地用戶端位置的 DNS 延遲,並顯示解析的 IP 位址。The tools on these sites measure DNS latencies and display the resolved IP addresses for client locations around the world. 這些工具大多數不會快取 DNS 結果。Most of these tools do not cache the DNS results. 因此,每次執行測試後工具會顯示完整的 DNS 查閱。Therefore, the tools show the full DNS lookup each time a test is run. 當您從自己的用戶端進行測試時,在 TTL 期間只會發生一次完整的 DNS 查閱效能。When you test from your own client, you only experience the full DNS lookup performance once during the TTL duration.

測量 DNS 效能的範例工具Sample tools to measure DNS performance

  • SolveDNSSolveDNS

    SolveDNS 提供許多效能工具。SolveDNS offers many performance tools. 其 DNS 比較工具可以顯示 DNS 名稱解析所需的時間長度,以及與其他 DNS 服務提供者之間的比較。The DNS Comparison tool can show you how long it takes to resolve your DNS name and how that compares to other DNS service providers.

  • WebSitePulseWebSitePulse

    其中一個最簡單的工具是 WebSitePulse。One of the simplest tools is WebSitePulse. 輸入 URL,您就會看到 DNS 解析時間、第一個位元組、最後一個位元組,以及其他效能統計資料。Enter the URL to see DNS resolution time, First Byte, Last Byte, and other performance statistics. 您可以從三個不同的測試位置中選擇。You can choose from three different test locations. 在本範例中,您會看到第一次執行顯示 DNS 查閱用了 0.204 秒。In this example, you see that the first execution shows that DNS lookup takes 0.204 sec.

    pulse1

    因為結果已快取過了,對相同流量管理員端點進行第二次測試時,DNS 查閱用了 0.002 秒。Because the results are cached, the second test for the same Traffic Manager endpoint the DNS lookup takes 0.002 sec.

    pulse2

  • CA App Synthetic MonitorCA App Synthetic Monitor

    此網站先前稱為監看式滑鼠檢查網站工具,可讓您同時為您顯示來自多個地理區域的 DNS 解析時間。Formerly known as the Watch-mouse Check Website tool, this site show you the DNS resolution time from multiple geographic regions simultaneously. 輸入 URL 可以看到 DNS 解析時間、連接時間,以及數個地理位置的速度。Enter the URL to see DNS resolution time, connection time, and speed from several geographic locations. 使用這項測試,查看在世界各地不同位置哪個裝載的服務會傳回。Use this test to see which hosted service is returned for different locations around the world.

    pulse1

  • PingdomPingdom

    這項工具提供網頁每個項目的效能統計資料。This tool provides performance statistics for each element of a web page. [頁面分析] 索引標籤顯示執行 DNS 查閱所花費的時間百分比。The Page Analysis tab shows the percentage of time spent on DNS lookup.

  • What's My DNS?What's My DNS?

    這個網站將會從 20 個不同位置執行 DNS 查閱,並將結果顯示在地圖上。This site does a DNS lookup from 20 different locations and displays the results on a map.

  • Dig Web InterfaceDig Web Interface

    這個網站會顯示更詳細的 DNS 資訊,包括 CNAME 和 A 記錄。This site shows more detailed DNS information including CNAMEs and A records. 請務必選取選項下的 [Colorize output] 和 [Stats],並選取 [Nameservers] 下的 [All]。Make sure you check the 'Colorize output' and 'Stats' under options, and select 'All' under Nameservers.

後續步驟Next Steps

關於流量管理員流量路由方法About Traffic Manager traffic routing methods

測試流量管理員設定Test your Traffic Manager settings

流量管理員的相關作業 (REST API 參考)Operations on Traffic Manager (REST API Reference)

Azure 流量管理員 CmdletAzure Traffic Manager Cmdlets