流量管理員端點監視Traffic Manager endpoint monitoring

Azure 流量管理員包含內建的端點監視和自動端點容錯移轉。Azure Traffic Manager includes built-in endpoint monitoring and automatic endpoint failover. 此功能可協助您提供能夠從端點故障中恢復的高可用性應用程 式,包括 Azure 區域失敗。This feature helps you deliver high-availability applications that are resilient to endpoint failure, including Azure region failures.

設定端點監視Configure endpoint monitoring

若要設定端點監視,您必須在流量管理員設定檔中指定下列設定︰To configure endpoint monitoring, you must specify the following settings on your Traffic Manager profile:

  • 通訊協定Protocol. 選擇 HTTP、HTTPS 或 TCP 作為通訊協定,流量管理員會在探查端點以檢查其健康情況時使用。Choose HTTP, HTTPS, or TCP as the protocol that Traffic Manager uses when probing your endpoint to check its health. HTTPS 監視不會驗證您的 SSL 憑證是否有效,它只會檢查該憑證是否存在。HTTPS monitoring does not verify whether your SSL certificate is valid--it only checks that the certificate is present.

  • 連接埠Port. 選擇要求所使用的連接埠。Choose the port used for the request.

  • 路徑Path. 組態設定僅適用於 HTTP 和 HTTPS 通訊協定,這些通訊協定需要指定路徑設定。This configuration setting is valid only for the HTTP and HTTPS protocols, for which specifying the path setting is required. 為 TCP 監視通訊協定提供這項設定會導致錯誤。Providing this setting for the TCP monitoring protocol results in an error. 對於 HTTP 和 HTTPS 通訊協定,提供監視存取之網頁或檔案的相對路徑和名稱。For HTTP and HTTPS protocol, give the relative path and the name of the webpage or the file that the monitoring accesses. 正斜線 (/) 是相對路徑的有效項目。A forward slash (/) is a valid entry for the relative path. 這個值表示檔案位於根目錄 (預設值)。This value implies that the file is in the root directory (default).

  • 自訂標頭設定此組態設定可協助您將特定 HTTP 標頭新增至健康情況檢查,讓流量管理員將其傳送至設定檔下的端點。Custom header settings This configuration setting helps you add specific HTTP headers to the health checks that Traffic Manager sends to endpoints under a profile. 您可以在設定檔層級上指定自訂標頭,以套用到該設定檔中的所有端點,以及/或在端點層級上指定,讓標頭僅套用到該端點。The custom headers can be specified at a profile level to be applicable for all endpoints in that profile and / or at an endpoint level applicable only to that endpoint. 您可以使用自訂標頭來指定主機標頭,讓多租用戶環境中的端點健康情況檢查可正確地路由到其目的地。You can use custom headers for having health checks to endpoints in a multi-tenant environment be routed correctly to their destination by specifying a host header. 您也可以使用此設定來新增唯一標頭,以用來識別流量管理員產生的 HTTP(S) 要求,並以不同方式處理這些要求。You can also use this setting by adding unique headers that can be used to identify Traffic Manager originated HTTP(S) requests and processes them differently. 您可以指定最多八個標頭: 值配對 seprated 以逗號分隔。You can specify up to eight header:value pairs seprated by a comma. 例如,"header1:value1,header2:value2"。For example, "header1:value1,header2:value2".

  • 預期狀態碼範圍此設定可讓您以下列格式指定多個成功碼範圍:200-299、301-301。Expected status code ranges This setting allows you to specify multiple success code ranges in the format 200-299, 301-301. 如果這些狀態碼是健康情況檢查啟動時從端點接收的回應,流量管理員會將這些端點標示為狀況良好。If these status codes are received as response from an endpoint when a health check is initiated, Traffic Manager marks those endpoints as healthy. 您可以指定最多 8 個狀態碼範圍。You can specify a maximum of 8 status code ranges. 此設定僅適用於 HTTP 和 HTTPS 通訊協定和所有端點。This setting is applicable only to HTTP and HTTPS protocol and to all endpoints. 此設定位於流量管理員設定檔層級,而且根據預設,值 200 會定義為成功狀態碼。This setting is at the Traffic Manager profile level and by default the value 200 is defined as the success status code.

  • 探查間隔Probing interval. 這個值會指定流量管理員探查代理程式檢查端點健康情況的頻率。This value specifies how often an endpoint is checked for its health from a Traffic Manager probing agent. 您可以指定以下兩個值:30 秒 (一般探查) 和 10 秒 (快速探查)。You can specify two values here: 30 seconds (normal probing) and 10 seconds (fast probing). 如果沒有提供任何值,設定檔會設定為預設值 30 秒。If no values are provided, the profile sets to a default value of 30 seconds. 請瀏覽流量管理員定價分頁以深入了解快速探查定價的詳細資訊。Visit the Traffic Manager Pricing page to learn more about fast probing pricing.

  • 容許的失敗次數Tolerated number of failures. 這個值會指定在將該端點標示為狀況不良之前,流量管理員探查代理程式可以容許多少次失敗。This value specifies how many failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. 此值必須介於 0 到 9 的範圍內。Its value can range between 0 and 9. 值為 0 表示單一監視失敗就會導致將該端點標示為狀況不良。A value of 0 means a single monitoring failure can cause that endpoint to be marked as unhealthy. 如果未指定任何值,它會使用預設值 3。If no value is specified, it uses the default value of 3.

  • 探查逾時Probe timeout. 此屬性會指定流量管理員探查代理程式在健康情況檢查探查傳送至端點時,將該檢查視為失敗之前應該等待的時間量。This property specifies the amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. 如果探查間隔設定為 30 秒,則您可以設定介於 5 到 10 秒的逾時值。If the Probing Interval is set to 30 seconds, then you can set the Timeout value between 5 and 10 seconds. 如果未指定任何值,它會使用預設值 10 秒。If no value is specified, it uses a default value of 10 seconds. 如果探查間隔設定為 10 秒,則您可以設定介於 5 到 9 秒的逾時值。If the Probing Interval is set to 10 seconds, then you can set the Timeout value between 5 and 9 seconds. 如果未指定任何逾時值,它會使用預設值 9 秒。If no Timeout value is specified, it uses a default value of 9 seconds.

    流量管理員端點監視

    圖:流量管理員端點監視Figure: Traffic Manager endpoint monitoring

端點監視的運作方式How endpoint monitoring works

如果監視通訊協定設定為 HTTP 或 HTTPS,流量管理員探查代理程式會使用通訊協定、連接埠以及指定的相對路徑,向端點提出 GET 要求。If the monitoring protocol is set as HTTP or HTTPS, the Traffic Manager probing agent makes a GET request to the endpoint using the protocol, port, and relative path given. 如果它獲得 200 OK 回應,或任何回應中設定預期狀態碼*範圍,則該端點視為狀況良好。If it gets back a 200-OK response, or any of the responses configured in the Expected status code *ranges, then that endpoint is considered healthy. 如果回應是不同的值,或者,如果在指定的逾時期間內未收到回應,則流量管理員探查代理程式會根據「容許的失敗次數」設定重新嘗試 (如果此設定為 0 則不會重新嘗試)。If the response is a different value, or, if no response is received within the timeout period specified, then the Traffic Manager probing agent re-attempts according to the Tolerated Number of Failures setting (no re-attempts are done if this setting is 0). 如果連續失敗次數大於「容許的失敗次數」設定,則該端點會標示為狀況不良。If the number of consecutive failures is higher than the Tolerated Number of Failures setting, then that endpoint is marked as unhealthy.

如果監視通訊協定是 TCP,流量管理員探查代理程式會使用指定的連接埠初始化 TCP 連線要求。If the monitoring protocol is TCP, the Traffic Manager probing agent initiates a TCP connection request using the port specified. 如果端點以建立連線的回應來回覆要求,該健康情況檢查會標示為成功,且流量管理員探查代理程式會重設 TCP 連線。If the endpoint responds to the request with a response to establish the connection, that health check is marked as a success and the Traffic Manager probing agent resets the TCP connection. 如果回應是不同的值,或者,如果在指定的逾時期間內未收到回應,流量管理員探查代理程式會根據「容許的失敗次數」設定重新嘗試 (如果此設定為 0 則不會重新嘗試)。If the response is a different value, or if no response is received within the timeout period specified, the Traffic Manager probing agent re-attempts according to the Tolerated Number of Failures setting (no re-attempts are made if this setting is 0). 如果連續失敗次數大於「容許的失敗次數」設定,則該端點會標示為狀況不良。If the number of consecutive failures is higher than the Tolerated Number of Failures setting, then that endpoint is marked unhealthy.

在所有情況下,流量管理員會從多個位置探查,連續失敗判斷會在每個區域內發生。In all cases, Traffic Manager probes from multiple locations and the consecutive failure determination happens within each region. 這也表示端點收到來自流量管理員之健康情況檢查探查的頻率,會比用於探查間隔的設定更高。This also means that endpoints are receiving health probes from Traffic Manager with a higher frequency than the setting used for Probing Interval.

注意

對於 HTTP 或 HTTPS 監視通訊協定,端點端上常見的做法是在您的應用程式內實作自訂分頁,例如,/health.aspx。For HTTP or HTTPS monitoring protocol, a common practice on the endpoint side is to implement a custom page within your application - for example, /health.aspx. 使用此路徑進行監視,您可以執行應用程式特定的檢查,例如檢查效能計數器或驗證資料庫可用性。Using this path for monitoring, you can perform application-specific checks, such as checking performance counters or verifying database availability. 根據這些自訂檢查,頁面會傳回適當的 HTTP 狀態碼。Based on these custom checks, the page returns an appropriate HTTP status code.

流量管理員設定檔中的所有端點都共用監視設定。All endpoints in a Traffic Manager profile share monitoring settings. 如果您需要對不同端點使用不同的監視設定,您可以建立巢狀流量管理員設定檔If you need to use different monitoring settings for different endpoints, you can create nested Traffic Manager profiles.

端點和設定檔狀態Endpoint and profile status

您可以啟用和停用流量管理員設定檔和端點。You can enable and disable Traffic Manager profiles and endpoints. 不過,端點狀態中的變更也可能是因為流量管理員自動設定和程序的結果所導致。However, a change in endpoint status also might occur as a result of Traffic Manager automated settings and processes.

端點狀態Endpoint status

您可以啟用或停用特定端點。You can enable or disable a specific endpoint. 基礎服務可能仍然狀況良好,不受影響。The underlying service, which might still be healthy, is unaffected. 變更端點狀態可控制流量管理員設定檔中端點的可用性。Changing the endpoint status controls the availability of the endpoint in the Traffic Manager profile. 當端點狀態為「已停用」時,流量管理員不會檢查其健全狀況,而且端點不會包含於 DNS 回應中。When an endpoint status is disabled, Traffic Manager does not check its health and the endpoint is not included in a DNS response.

設定檔狀態Profile status

使用設定檔狀態設定,您可以啟用或停用特定的設定檔。Using the profile status setting, you can enable or disable a specific profile. 儘管端點狀態只會影響單一端點,設定檔狀態仍會影響整個設定檔,包括所有端點。While endpoint status affects a single endpoint, profile status affects the entire profile, including all endpoints. 當您停用設定檔時,不會檢查端點的健全狀況,而且 DNS 回應中不會包含任何端點。When you disable a profile, the endpoints are not checked for health and no endpoints are included in a DNS response. 會針對 DNS 查詢傳回 NXDOMAIN 回應碼。An NXDOMAIN response code is returned for the DNS query.

端點監視狀態Endpoint monitor status

端點監視狀態是流量管理員所產生的值,會顯示端點的狀態。Endpoint monitor status is a Traffic Manager-generated value that shows the status of the endpoint. 您無法手動變更此設定。You cannot change this setting manually. 端點監視狀態是端點監視的結果以及設定端點狀態的組合。The endpoint monitor status is a combination of the results of endpoint monitoring and the configured endpoint status. 下表顯示端點監視狀態的可能值:The possible values of endpoint monitor status are shown in the following table:

設定檔狀態Profile status 端點狀態Endpoint status 端點監視狀態Endpoint monitor status 注意Notes
已停用Disabled EnabledEnabled 非使用中Inactive 已停用設定檔。The profile has been disabled. 儘管端點狀態為「已啟用」,但會優先採用設定檔狀態 (「已停用」)。Although the endpoint status is Enabled, the profile status (Disabled) takes precedence. 不會監視「已停用」設定檔中的端點。Endpoints in disabled profiles are not monitored. 會針對 DNS 查詢傳回 NXDOMAIN 回應碼。An NXDOMAIN response code is returned for the DNS query.
<any><any> 已停用Disabled 已停用Disabled 已停用端點。The endpoint has been disabled. 不會監視「已停用」的端點。Disabled endpoints are not monitored. 端點未包含於 DNS 回應中,因此不會接收流量。The endpoint is not included in DNS responses, therefore, it does not receive traffic.
EnabledEnabled EnabledEnabled 線上Online 端點受到監視且狀況良好。The endpoint is monitored and is healthy. 端點包含於 DNS 回應中,因此可接收流量。It is included in DNS responses and can receive traffic.
EnabledEnabled EnabledEnabled 已降級Degraded 端點監視健全狀況檢查失敗。Endpoint monitoring health checks are failing. 端點未包含於 DNS 回應中,因此不會接收流量。The endpoint is not included in DNS responses and does not receive traffic.
例外狀況是如果所有端點都降級,如果發生這種情況,則所有端點會被視為要在查詢回應中傳回。An exception to this is if all endpoints are degraded, in which case all of them are considered to be returned in the query response).
EnabledEnabled EnabledEnabled 正在檢查端點CheckingEndpoint 端點受到監視,但尚未收到第一次探查的結果。The endpoint is monitored, but the results of the first probe have not been received yet. CheckingEndpoint 是暫時性狀態,其通常會在新增或啟用設定檔中的端點之後立即發生。CheckingEndpoint is a temporary state that usually occurs immediately after adding or enabling an endpoint in the profile. 處於此狀態的端點會包含於 DNS 回應中,因此可接收流量。An endpoint in this state is included in DNS responses and can receive traffic.
EnabledEnabled EnabledEnabled 已停止Stopped 端點指向的 web 應用程式並未執行。The web app that the endpoint points to is not running. 檢查 web 應用程式設定。Check the web app settings. 如果端點是巢狀端點類型,且子系設定檔已停用或非使用中,也會發生這種情況。This can also happen if the endpoint is of type nested endpoint and the child profile is disabled or is inactive.
「已停止」狀態的端點不會受到監視。An endpoint with a Stopped status is not monitored. 它未包含於 DNS 回應中,因此不會接收流量。It is not included in DNS responses and does not receive traffic. 例外狀況是如果所有端點都降級,如果發生這種情況,則所有端點會被視為要在查詢回應中傳回。An exception to this is if all endpoints are degraded, in which case all of them will be considered to be returned in the query response.

如需如何計算巢狀端點的端點監視狀態詳細資訊,請參閱巢狀流量管理員設定檔For details about how endpoint monitor status is calculated for nested endpoints, see nested Traffic Manager profiles.

注意

如果準層或以上層級中的 Web 應用程式未執行,App Service 可能會發生「已停止」端點監視狀態。A Stopped Endpoint monitor status can happen on App Service if your web application is not running in the Standard tier or above. 如需詳細資訊,請參閱流量管理員與 App Service 整合For more information, see Traffic Manager integration with App Service.

設定檔監視狀態Profile monitor status

設定檔監視狀態是所有端點的端點監視狀態值,以及設定之設定檔狀態所形成的組合。The profile monitor status is a combination of the configured profile status and the endpoint monitor status values for all endpoints. 下表說明可能的值︰The possible values are described in the following table:

設定檔狀態 (依設定)Profile status (as configured) 端點監視狀態Endpoint monitor status 設定檔監視狀態Profile monitor status 注意Notes
已停用Disabled <任何>或未定義端點的設定檔。<any> or a profile with no defined endpoints. 已停用Disabled 已停用設定檔。The profile has been disabled.
EnabledEnabled 至少有一個端點的狀態為「已降級」。The status of at least one endpoint is Degraded. 已降級Degraded 檢閱個別端點狀態值,以判斷哪些端點需要進一步注意。Review the individual endpoint status values to determine which endpoints require further attention.
EnabledEnabled 至少有一個端點的狀態為「線上」。The status of at least one endpoint is Online. 沒有狀態為「已降級」的端點。No endpoints have a Degraded status. 線上Online 服務正在接收流量。The service is accepting traffic. 不需要採取任何動作。No further action is required.
EnabledEnabled 至少有一個端點的狀態為「正在檢查端點」。The status of at least one endpoint is CheckingEndpoint. 沒有狀態為「線上」或「已降級」的端點。No endpoints are in Online or Degraded status. 正在檢查端點CheckingEndpoints 建立或啟用設定檔時,就會發生此轉換狀態。This transition state occurs when a profile if created or enabled. 正在初次檢查端點健康情況。The endpoint health is being checked for the first time.
EnabledEnabled 設定檔中的所有端點狀態為「已停用」或「已停止」,或者設定檔並未定義任何端點。The statuses of all endpoints in the profile are either Disabled or Stopped, or the profile has no defined endpoints. 非使用中Inactive 沒有作用中的端點,但設定檔仍為「已啟用」。No endpoints are active, but the profile is still Enabled.

端點容錯移轉和復原Endpoint failover and recovery

流量管理員會定期檢查每個端點的健康狀態,包括狀況不良的端點健康情況。Traffic Manager periodically checks the health of every endpoint, including unhealthy endpoints. 當端點變成狀況良好時,流量管理員會偵測到此狀況,並且將它恢復至輪替。Traffic Manager detects when an endpoint becomes healthy and brings it back into rotation.

發生下列任何一種狀況時,端點為狀況不良:An endpoint is unhealthy when any of the following events occur:

  • 如果監視通訊協定是 HTTP 或 HTTPS:If the monitoring protocol is HTTP or HTTPS:
    • 您會收到不是 200 的回應,或不包含預期狀態碼範圍設定中指定狀態範圍的回應 (包括不同的 2xx 碼或 301/302 重新導向)。A non-200 response, or a response that does not include the status range specified in the Expected status code ranges setting, is received (including a different 2xx code, or a 301/302 redirect).
  • 如果監視通訊協定是 TCP:If the monitoring protocol is TCP:
    • 以回應 SYN 要求傳送給嘗試連線建立的 流量管理員收到 ACK 或 SYN-ACK 以外的回應。A response other than ACK or SYN-ACK is received in response to the SYN request sent by Traffic Manager to attempt a connection establishment.
  • 逾時。Timeout.
  • 導致無法連線到端點的任何其他連線問題。Any other connection issue resulting in the endpoint being not reachable.

如需疑難排解失敗檢查的詳細資訊,請參閱 疑難排解 Azure 流量管理員上的已降級狀態For more information about troubleshooting failed checks, see Troubleshooting Degraded status on Azure Traffic Manager.

下圖中的下列時間軸是流量管理員端點的監視處理序詳細說明,具有以下設定:監視通訊協定為 HTTP、探查間隔為 30 秒、容許的失敗次數為 3 次、逾時值為 10 秒,以及 DNS TTL 為 30 秒。The timeline in the following figure is a detailed description of the monitoring process of Traffic Manager endpoint that has the following settings: monitoring protocol is HTTP, probing interval is 30 seconds, number of tolerated failures is 3, timeout value is 10 seconds, and DNS TTL is 30 seconds.

流量管理員端點容錯移轉和容錯回復順序

圖:流量管理員端點容錯移轉和復原順序Figure: Traffic manager endpoint failover and recovery sequence

  1. GETGET. 對於每個端點而言,流量管理員監視系統會對監視設定中指定的路徑執行 GET 要求。For each endpoint, the Traffic Manager monitoring system performs a GET request on the path specified in the monitoring settings.

  2. 已指定 200 OK 或自訂程式碼範圍的流量管理員設定檔監視設定200 OK or custom code range specified Traffic Manager profile monitoring settings . 監視系統預期 10 秒內會傳回已指定 HTTP 200 OK 或自訂程式碼範圍的流量管理員設定檔監視設定訊息。The monitoring system expects an HTTP 200 OK or the or custom code range specified Traffic Manager profile monitoring settings message to be returned within 10 seconds. 收到此回應時,就能確認服務可供使用。When it receives this response, it recognizes that the service is available.

  3. 每次檢查之間間隔 30 秒30 seconds between checks. 每隔 30 秒重複進行端點健康狀態檢查。The endpoint health check is repeated every 30 seconds.

  4. 服務無法使用Service unavailable. 服務變為無法使用。The service becomes unavailable. 流量管理員要直到下次健全狀況檢查時才會知道。Traffic Manager will not know until the next health check.

  5. 嘗試存取監視路徑Attempts to access the monitoring path. 監視系統執行 GET 要求,但沒有在 10 秒鐘的逾時期限內收到回應 (反而可能收到非 200 的回應)。The monitoring system performs a GET request, but does not receive a response within the timeout period of 10 seconds (alternatively, a non-200 response may be received). 接著每隔 30 秒執行一次,再嘗試三次。It then tries three more times, at 30-second intervals. 如果其中一次嘗試成功,會重設嘗試次數。If one of the tries is successful, then the number of tries is reset.

  6. 將狀態設為已降級Status set to Degraded. 在第四次連續失敗之後,監視系統會將無法使用的端點狀態標示為「已降級」。After a fourth consecutive failure, the monitoring system marks the unavailable endpoint status as Degraded.

  7. 流量轉向其他端點Traffic is diverted to other endpoints. 流量管理員 DNS 名稱伺服器已更新,而流量管理員在回應 DNS 查詢時不再傳回端點。The Traffic Manager DNS name servers are updated and Traffic Manager no longer returns the endpoint in response to DNS queries. 新的連接會導向至其他可用的端點。New connections are directed to other, available endpoints. 不過,先前包含此端點的 DNS 回應仍可能由遞迴 DNS 伺服器和 DNS 用戶端所快取。However, previous DNS responses that include this endpoint may still be cached by recursive DNS servers and DNS clients. 用戶端會繼續使用端點,直到 DNS 快取過期為止。Clients continue to use the endpoint until the DNS cache expires. 當 DNS 快取過期時,用戶端會提出新的 DNS 查詢,並導向至不同的端點。As the DNS cache expires, clients make new DNS queries and are directed to different endpoints. 快取持續時間是由流量管理員設定檔中的 TTL 設定所控制,例如 30 秒。The cache duration is controlled by the TTL setting in the Traffic Manager profile, for example, 30 seconds.

  8. 健全狀況檢查繼續Health checks continue. 儘管端點處於「已降級」狀態,流量管理員還是會繼續檢查它的健全狀況。Traffic Manager continues to check the health of the endpoint while it has a Degraded status. 當端點恢復成狀況良好的狀態時,流量管理員會偵測到此情況。Traffic Manager detects when the endpoint returns to health.

  9. 服務重新上線Service comes back online. 服務變為可供使用。The service becomes available. 端點會在流量管理員中維持「已降級」狀態,直到監視系統執行下一次健全狀況檢查為止。The endpoint retains its Degraded status in Traffic Manager until the monitoring system performs its next health check.

  10. 服務的流量恢復Traffic to service resumes. 流量管理員傳送 GET 要求,並收到 200 OK 狀態回應。Traffic Manager sends a GET request and receives a 200 OK status response. 此服務已恢復狀況良好的狀態。The service has returned to a healthy state. 流量管理員名稱伺服器會更新,並會開始在 DNS 回應中送出服務的 DNS 名稱。The Traffic Manager name servers are updated, and they begin to hand out the service's DNS name in DNS responses. 當傳回其他端點的快取 DNS 回應過期時,以及當其他端點的現有連接終止時,流量將再次回到端點。Traffic returns to the endpoint as cached DNS responses that return other endpoints expire, and as existing connections to other endpoints are terminated.

    注意

    由於流量管理員是在 DNS 層級運作,所以無法影響任何端點的現有連接。Because Traffic Manager works at the DNS level, it cannot influence existing connections to any endpoint. 在引導端點之間的流量時 (透過變更設定檔設定,或是在容錯移轉或容錯回復期間),流量管理員會將新的連接導向至可用的端點。When it directs traffic between endpoints (either by changed profile settings, or during failover or failback), Traffic Manager directs new connections to available endpoints. 不過,其他端點可透過現有的連接繼續接收流量,直到這些工作階段終止為止。However, other endpoints might continue to receive traffic via existing connections until those sessions are terminated. 若要將現有連接的流量排出,應用程式應該限制每個端點使用的工作階段持續時間。To enable traffic to drain from existing connections, applications should limit the session duration used with each endpoint.

流量路由方法Traffic-routing methods

當端點狀態為「已降級」,它不會再傳回以回應 DNS 查詢。When an endpoint has a Degraded status, it is no longer returned in response to DNS queries. 而是選擇並傳回替代端點。Instead, an alternative endpoint is chosen and returned. 設定檔中設定的流量路由方法會決定如何選擇替代端點。The traffic-routing method configured in the profile determines how the alternative endpoint is chosen.

  • 優先順序Priority. 端點會形成優先順序清單。Endpoints form a prioritized list. 永遠傳回清單上第一個可用的端點。The first available endpoint on the list is always returned. 如果端點狀態為「已降級」,則會傳回下一個可用的端點。If an endpoint status is Degraded, then the next available endpoint is returned.
  • 加權Weighted. 根據指派的加權和其他可用端點的加權,隨機選擇任何可用的端點。Any available endpoint is chosen at random based on their assigned weights and the weights of the other available endpoints.
  • 效能Performance. 會傳回最接近使用者的端點。The endpoint closest to the end user is returned. 如果該端點無法使用,流量管理員會將流量移至最接近的下一個 Azure 區域中的端點。If that endpoint is unavailable, Traffic Manager moves traffic to the endpoints in the next closest Azure region. 您可以使用巢狀流量管理員設定檔來設定效能流量路由的替代容錯移轉計劃。You can configure alternative failover plans for performance traffic-routing by using nested Traffic Manager profiles.
  • 地理Geographic. 會傳回根據查詢要求 IP,對地理位置提供服務的已對應端點。The endpoint mapped to serve the geographic location based on the query request IP’s is returned. 如果該端點無法使用,則不會選取要容錯移轉的另一個端點,因為地理位置只能對應至設定檔中的一個端點 (更多詳細資料位於常見問題集)。If that endpoint is unavailable, another endpoint will not be selected to failover to, since a geographic location can be mapped only to one endpoint in a profile (more details are in the FAQ). 使用地理路由時的最佳做法是,建議客戶使用具有多個端點作為設定檔端點的巢狀流量管理員設定檔。As a best practice, when using geographic routing, we recommend customers to use nested Traffic Manager profiles with more than one endpoint as the endpoints of the profile.
  • 多重值 傳回對應到 IPv4/IPv6 位址的多個端點。MultiValue Multiple endpoints mapped to IPv4/IPv6 addresses are returned. 收到此設定檔的查詢時,狀況良好的端點會根據回應中的記錄計數上限值 (已指定),傳回狀況良好的端點數。When a query is received for this profile, healthy endpoints are returned based on the Maximum record count in response value that you have specified. 回應的預設數目是兩個端點。The default number of responses is two endpoints.
  • 子網路傳回對應至一組 IP 位址範圍的端點。Subnet The endpoint mapped to a set of IP address ranges is returned. 從該 IP 位址收到要求時,傳回的端點會是該 IP 位址對應的端點。When a request is received from that IP address, the endpoint returned is the one mapped for that IP address. 

如需詳細資訊,請參閱 流量管理員流量路由方法For more information, see Traffic Manager traffic-routing methods.

注意

當所有合格的端點狀態為「已降級」時,正常的流量路由行為會發生例外狀況。One exception to normal traffic-routing behavior occurs when all eligible endpoints have a degraded status. 流量管理員會「竭盡所能」進行嘗試,且「彷彿所有已降級狀態的端點實際上是處於線上狀態一樣地回應」 。Traffic Manager makes a "best effort" attempt and responds as if all the Degraded status endpoints actually are in an online state. 此行為比在 DNS 回應中不傳回任何端點的另一種做法更好。This behavior is preferable to the alternative, which would be to not return any endpoint in the DNS response. 「已停用」或「已停止」端點不會受到監視,因此,不會將它們視為符合流量資格。Disabled or Stopped endpoints are not monitored, therefore, they are not considered eligible for traffic.

這種情況通常是因為服務組態不正確所造成的,例如:This condition is commonly caused by improper configuration of the service, such as:

  • 存取控制清單 [ACL] 封鎖流量管理員健康情況檢查。An access control list [ACL] blocking the Traffic Manager health checks.
  • 流量管理員設定檔中監視連接埠或通訊協定的設定不正確。An improper configuration of the monitoring port or protocol in the Traffic manager profile.

此行為的結果是當流量管理員健康狀態檢查未正確設定時,從流量路由傳送看起來,流量管理員似乎運作正常 。The consequence of this behavior is that if Traffic Manager health checks are not configured correctly, it might appear from the traffic routing as though Traffic Manager is working properly. 不過,在此情況下,不會發生影響整體應用程式可用性的端點容錯移轉。However, in this case, endpoint failover cannot happen which affects overall application availability. 請務必檢查設定檔會顯示為「線上」狀態,而不是「已降級」狀態。It is important to check that the profile shows an Online status, not a Degraded status. 「線上」狀態表示流量管理員的健康狀態檢查如預期般地運作。An Online status indicates that the Traffic Manager health checks are working as expected.

如需疑難排解無法進行健康狀態檢查的詳細資訊,請參閱疑難排解 Azure 流量管理員上的已降級狀態For more information about troubleshooting failed health checks, see Troubleshooting Degraded status on Azure Traffic Manager.

後續步驟Next steps

了解 流量管理員的運作方式Learn how Traffic Manager works

深入了解流量管理員支援的 流量路由方法Learn more about the traffic-routing methods supported by Traffic Manager

了解如何 建立流量管理員設定檔Learn how to create a Traffic Manager profile

疑難排解流量管理員端點上的已降級狀態Troubleshoot Degraded status on a Traffic Manager endpoint