流量管理器常见问题解答 (FAQ)Traffic Manager Frequently Asked Questions (FAQ)

流量管理器基础知识Traffic Manager basics

流量管理器使用什么 IP 地址?What IP address does Traffic Manager use?

流量管理器工作原理中所述,流量管理器在 DNS 级别工作。As explained in How Traffic Manager Works, Traffic Manager works at the DNS level. 它会发送 DNS 响应,将客户端定向到相应的服务终结点。It sends DNS responses to direct clients to the appropriate service endpoint. 然后,客户端直接连接到服务终结点,不通过流量管理器进行连接。Clients then connect to the service endpoint directly, not through Traffic Manager.

因此,流量管理器不提供供客户端连接的终结点或 IP 地址。Therefore, Traffic Manager does not provide an endpoint or IP address for clients to connect to. 如果想要为服务使用静态 IP 地址,必须在服务而不是流量管理器中配置该地址。If you want static IP address for your service, that must be configured at the service, not in Traffic Manager.

可以使用流量管理器路由什么类型的流量?What types of traffic can be routed using Traffic Manager?

流量管理器工作原理中所述,流量管理器终结点可以是任何面向 Internet 的 Azure 内部或外部托管的服务。As explained in How Traffic Manager Works, a Traffic Manager endpoint can be any internet facing service hosted inside or outside of Azure. 因此,流量管理器可以将源自公共 Internet 的流量路由到一组也面向 Internet 的终结点。Hence, Traffic Manager can route traffic that originates from the public internet to a set of endpoints that are also internet facing. 如果终结点位于专用网络内部(例如 Azure 负载均衡器的内部版本),或用户从此类内部网络发出 DNS 请求,则无法使用流量管理器来路由此流量。If you have endpoints that are inside a private network (for example, an internal version of Azure Load Balancer) or have users making DNS requests from such internal networks, then you cannot use Traffic Manager to route this traffic.

流量管理器是否支持“粘滞”会话?Does Traffic Manager support 'sticky' sessions?

流量管理器工作原理中所述,流量管理器在 DNS 级别工作。As explained in How Traffic Manager Works, Traffic Manager works at the DNS level. 它使用 DNS 响应将客户端引导到相应的服务终结点。It uses DNS responses to direct clients to the appropriate service endpoint. 客户端直接连接到服务终结点,而不是通过流量管理器连接。Clients connect to the service endpoint directly, not through Traffic Manager. 因此,流量管理器看不到客户端与服务器之间的 HTTP 流量。Therefore, Traffic Manager does not see the HTTP traffic between the client and the server.

此外,流量管理器收到的 DNS 查询的源 IP 地址属于递归 DNS 服务而不是客户端。Additionally, the source IP address of the DNS query received by Traffic Manager belongs to the recursive DNS service, not the client. 因此,流量管理器无法跟踪单个客户端,也无法实现“粘滞”会话。Therefore, Traffic Manager has no way to track individual clients and cannot implement 'sticky' sessions. 这种限制在所有基于 DNS 的流量管理系统中很常见,并不是流量管理器特有的限制。This limitation is common to all DNS-based traffic management systems and is not specific to Traffic Manager.

使用流量管理器时为何出现 HTTP 错误?Why am I seeing an HTTP error when using Traffic Manager?

流量管理器工作原理中所述,流量管理器在 DNS 级别工作。As explained in How Traffic Manager Works, Traffic Manager works at the DNS level. 它使用 DNS 响应将客户端引导到相应的服务终结点。It uses DNS responses to direct clients to the appropriate service endpoint. 然后,客户端直接连接到服务终结点,不通过流量管理器进行连接。Clients then connect to the service endpoint directly, not through Traffic Manager. 流量管理器看不到客户端与服务器之间的 HTTP 流量。Traffic Manager does not see HTTP traffic between client and server. 因此,出现的任何 HTTP 错误必定来自应用程序。Therefore, any HTTP error you see must be coming from your application. 要使客户端连接到应用程序,必须完成所有 DNS 解析步骤。For the client to connect to the application, all DNS resolution steps are complete. 这包括流量管理器对应用程序流量流所做的任何交互。That includes any interaction that Traffic Manager has on the application traffic flow.

因此,进一步的调查应着重于应用程序。Further investigation should therefore focus on the application.

问题的最常见原因源自客户端浏览器发送的 HTTP 主机标头。The HTTP host header sent from the client's browser is the most common source of problems. 请确保将应用程序配置为接受所要使用的域名的正确主机标头。Make sure that the application is configured to accept the correct host header for the domain name you are using. 对于使用 Azure 应用服务的终结点,请参阅使用流量管理器为 Azure 应用服务中的 Web 应用配置自定义域名For endpoints using the Azure App Service, see configuring a custom domain name for a web app in Azure App Service using Traffic Manager.

使用流量管理器对性能有什么影响?What is the performance impact of using Traffic Manager?

流量管理器工作原理中所述,流量管理器在 DNS 级别工作。As explained in How Traffic Manager Works, Traffic Manager works at the DNS level. 由于客户端直接连接到服务终结点,因此在使用流量管理器时,一旦建立连接就没有性能影响。Since clients connect to your service endpoints directly, there is no performance impact incurred when using Traffic Manager once the connection is established.

由于流量管理器在 DNS 级别与应用程序集成,因此需要将额外的 DNS 查找插入 DNS 解析链中。Since Traffic Manager integrates with applications at the DNS level, it does require an additional DNS lookup to be inserted into the DNS resolution chain. 流量管理器对 DNS 解析时间的影响微乎其微。The impact of Traffic Manager on DNS resolution time is minimal. 流量管理器使用全局性的名称服务器网络,并使用任播网络来确保始终将 DNS 查询路由到最靠近的可用名称服务器。Traffic Manager uses a global network of name servers, and uses anycast networking to ensure DNS queries are always routed to the closest available name server. 此外,对 DNS 响应进行缓存意味着,因使用流量管理器而导致的额外的 DNS 延迟仅出现在部分会话中。In addition, caching of DNS responses means that the additional DNS latency incurred by using Traffic Manager applies only to a fraction of sessions.

“性能”方法将流量路由到最靠近的可用终结点。The Performance method routes traffic to the closest available endpoint. 最终结果是,与此方法相关的整体性能影响会减到最小。The net result is that the overall performance impact associated with this method should be minimal. 通过减小与终结点之间的网络延迟,应该可以抵消 DNS 延迟增大造成的影响。Any increase in DNS latency should be offset by lower network latency to the endpoint.

流量管理器允许使用什么应用程序协议?What application protocols can I use with Traffic Manager?

流量管理器工作原理中所述,流量管理器在 DNS 级别工作。As explained in How Traffic Manager Works, Traffic Manager works at the DNS level. 完成 DNS 查找以后,客户端会直接连接到应用程序终结点,不通过流量管理器进行连接。Once the DNS lookup is complete, clients connect to the application endpoint directly, not through Traffic Manager. 因此,连接可以使用任何应用程序协议。Therefore, the connection can use any application protocol. 如果选择 TCP 作为监视协议,则无需使用任何应用程序协议即可执行流量管理器的终结点运行状况监视。If you select TCP as the monitoring protocol, Traffic Manager's endpoint health monitoring can be done without using any application protocols. 如果选择使用应用程序协议验证运行状态,则终结点需要能够响应 HTTP 或 HTTPS GET 请求。If you choose to have the health verified using an application protocol, the endpoint needs to be able to respond to either HTTP or HTTPS GET requests.

是否可以对“裸”域名使用流量管理器?Can I use Traffic Manager with a 'naked' domain name?

否。No. DNS 标准不允许 CNAME 与其他同名的 DNS 记录共存。The DNS standards do not permit CNAMEs to co-exist with other DNS records of the same name. DNS 区域的顶点(或根)始终包含两条预先存在的 DNS 记录:SOA 和权威 NS 记录。The apex (or root) of a DNS zone always contains two pre-existing DNS records; the SOA and the authoritative NS records. 这意味着在不违反 DNS 标准的情况下,无法在区域顶点位置创建 CNAME 记录。This means a CNAME record cannot be created at the zone apex without violating the DNS standards.

流量管理器需要使用一条 DNS CNAME 记录来映射虚构 DNS 名称。Traffic Manager requires a DNS CNAME record to map the vanity DNS name. 例如,将 www.contoso.com 映射到流量管理器配置文件 DNS 名称 contoso.trafficmanager.cnFor example, you map www.contoso.com to the Traffic Manager profile DNS name contoso.trafficmanager.cn. 此外,流量管理器配置文件还会返回另一条 DNS CNAME 来指示客户端应连接到的终结点。Additionally, the Traffic Manager profile returns a second DNS CNAME to indicate which endpoint the client should connect to.

要解决此问题,我们建议使用 HTTP 重定向将流量从裸域名定向到不同的 URL,然后即可使用流量管理器。To work around this issue, we recommend using an HTTP redirect to direct traffic from the naked domain name to a different URL, which can then use Traffic Manager. 例如,裸域“contoso.com”可将用户重定向到指向流量管理器 DNS 名称的 CNAME“www.contoso.com”。For example, the naked domain 'contoso.com' can redirect users to the CNAME 'www.contoso.com' that points to the Traffic Manager DNS name.

处理 DNS 查询时流量管理器是否会考虑客户端子网地址?Does Traffic Manager consider the client subnet address when handling DNS queries?

会,除了其收到的 DNS 查询的源 IP 地址(通常是 DNS 解析器的 IP 地址)以外,在执行地理、性能和子网路由方法的查找时,流量管理器还会考虑客户端子网地址(如果它通过代表最终用户发起请求的解析器包含在查询中)。Yes, in addition to the source IP address of the DNS query it receives (which usually is the IP address of the DNS resolver), when performing lookups for Geographic, Performance, and Subnet routing methods, traffic manager also considers the client subnet address if it is included in the query by the resolver making the request on behalf of the end user.
具体而言,RFC 7871 - DNS 查询中的客户端子网可提供 DNS (EDNS0) 的扩展机制,可通过客户端子网地址从支持该机制的解析器传递该机制。Specifically, RFC 7871 - Client Subnet in DNS Queries that provides an Extension Mechanism for DNS (EDNS0) which can pass on the client subnet address from resolvers that support it.

什么是 DNS TTL,它如何影响我的用户?What is DNS TTL and how does it impact my users?

当某个 DNS 查询进入流量管理器时,它会在响应中设置一个名为生存时间 (TTL) 的值。When a DNS query lands on Traffic Manager, it sets a value in the response called time-to-live (TTL). 此值的单位为秒,向下游的 DNS 解析程序指明要将此响应缓存多长时间。This value, whose unit is in seconds, indicates to DNS resolvers downstream on how long to cache this response. 尽管无法保证 DNS 解析程序会缓存此结果,但如果缓存结果的话,解析程序就能通过缓存响应所有后续查询,而无需转到流量管理器 DNS 服务器。While DNS resolvers are not guaranteed to cache this result, caching it enables them to respond to any subsequent queries off the cache instead of going to Traffic Manager DNS servers. 这会对响应造成如下所述的影响:This impacts the responses as follows:

  • 更高的 TTL 可以减少进入流量管理器 DNS 服务器的查询数目,从而又可以降低客户的成本,因为根据查询数目提供服务是要收费的。a higher TTL reduces the number of queries that land on the Traffic Manager DNS servers, which can reduce the cost for a customer since number of queries served is a billable usage.
  • 更高的 TTL 可能会减少执行 DNS 查找所需的时间。a higher TTL can potentially reduce the time it takes to do a DNS lookup.
  • 更高的 TTL 还意味着,数据不会反映流量管理器通过其探测代理获取到的最新运行状况信息。a higher TTL also means that your data does not reflect the latest health information that Traffic Manager has obtained through its probing agents.

可将流量管理器响应的 TTL 设置为多高或多低?How high or low can I set the TTL for Traffic Manager responses?

在配置文件级别,DNS TTL 最低可设置为 0 秒,最高可设置为 2,147,483,647 秒(符合 RFC-1035 的最大范围)。You can set, at a per profile level, the DNS TTL to be as low as 0 seconds and as high as 2,147,483,647 seconds (the maximum range compliant with RFC-1035). TTL 为 0 表示下游 DNS 解析程序不会缓存查询响应,所有查询预期会进入流量管理器 DNS 服务器供解析。A TTL of 0 means that downstream DNS resolvers do not cache query responses and all queries are expected to reach the Traffic Manager DNS servers for resolution.

流量管理器的“地理”流量路由方法Traffic Manager Geographic traffic routing method

可以在哪些情况下使用地理路由?What are some use cases where geographic routing is useful?

只要 Azure 客户需要根据地理区域辨识其用户,即可使用地理路由类型。Geographic routing type can be used in any scenario where an Azure customer needs to distinguish their users based on geographic regions. 例如,通过使用地理流量路由方法可为特定区域的用户提供不同于其他区域的用户体验。For example, using the Geographic traffic routing method, you can give users from specific regions a different user experience than those from other regions. 又比如,根据本地数据自主性的规定,只能由同一区域的终结点为用户提供数据。Another example is complying with local data sovereignty mandates that require that users from a specific region be served only by endpoints in that region.

如何决定我应当使用性能路由方法还是应当使用地理路由方法?How do I decide if I should use Performance routing method or Geographic routing method?

这两种常用路由方法的主要区别为,在性能路由方法中,主要目标是将流量发送到可以为调用方提供最低延迟的终结点,但是,在地理路由中,主要目标是针对调用方实施地理围栏,以便可以特意将它们路由到特定终结点。The key difference between these two popular routing methods is that in Performance routing method your primary goal is to send traffic to the endpoint that can provide the lowest latency to the caller, whereas, in Geographic routing the primary goal is to enforce a geo fence for your callers so that you can deliberately route them to a specific endpoint. 因为地理接近与延迟更低之间存在关联,所以这两种路由方法可能会存在重叠,但是并非始终会重叠。The overlap happens since there is a correlation between geographical closeness and lower latency, although this is not always true. 如果另一地理位置中的终结点可以为调用方提供更好的延迟体验,在这种情况下,性能路由会将用户发送到该终结点,但地理路由始终将用户发送到你为其地理区域映射的终结点。There might be an endpoint in a different geography that can provide a better latency experience for the caller and in that case Performance routing will send the user to that endpoint but Geographic routing will always send them to the endpoint you have mapped for their geographic region. 在这种情况下,地理路由将特意执行你为其配置的要执行的确切操作,性能优化不是一个考虑因素。In that case, Geographic routing will deliberately do exactly what you have configured it to do and performance optimization is not a consideration.

Note

在某些场景中,你可能同时需要性能和地理路由功能,对于这些场景,嵌套式配置文件可能是不错的选择。There may be scenarios where you might need both performance and geographic routing capabilities, for these scenarios nested profiles can be great choice.

流量管理器如何确定用户从何处进行查询?How does traffic manager determine where a user is querying from?

流量管理器会查看查询的源 IP(很可能是本地 DNS 解析程序在代表用户执行查询),并使用内部 IP 通过区域映射的方式确定位置。Traffic Manager looks at the source IP of the query (this most likely is a local DNS resolver doing the querying on behalf of the user) and uses an internal IP to region map to determine the location. 该映射会随时更新,以反映 Internet 中的变化。This map is updated on an ongoing basis to account for changes in the internet.

是否可以保证流量管理器在每种情况下都可正确确定用户的确切地理位置?Is it guaranteed that Traffic Manager can correctly determine the exact geographic location of the user in every case?

不可以;流量管理器无法保证我们根据 DNS 查询的源 IP 地址推断出的地理区域始终对应用户的位置,原因如下:No, Traffic Manager cannot guarantee that the geographic region we infer from the source IP address of a DNS query will always correspond to the user's location due to the following reasons:

  • 首先,如之前常见问题解答中所述,我们所见的源 IP 地址是代表用户执行查询的 DNS 解析器的 IP 地址。First, as described in the previous FAQ, the source IP address we see is that of a DNS resolver doing the lookup on behalf of the user. 虽然 DNS 解析器的地理位置很好地反映了用户的地理位置,但根据 DNS 解析器服务的足迹和用户选择使用的特定 DNS 解析器服务而有所不同。While the geographic location of the DNS resolver is a good proxy for the geographic location of the user, it can also be different depending upon the footprint of the DNS resolver service and the specific DNS resolver service a customer has chosen to use. 举例来说,位于马来西亚的客户可能在其设备设置中指定使用一种 DNS 解析器服务,但可能会选取该服务在新加坡的 DNS 服务器来处理此用户/设备的查询解析。As an example, a customer located in Malaysia could specify in their device's settings use a DNS resolver service whose DNS server in Singapore might get picked to handle the query resolutions for that user/device. 这种情况下,流量管理器仅会显示对应于新加坡位置的解析程序的 IP 地址。In that case, Traffic Manager can only see the resolver's IP address that corresponds to the Singapore location. 另请参阅本页面上之前有关客户端子网地址支持的常见问题解答。Also, see the earlier FAQ regarding client subnet address support on this page.

  • 其次,流量管理器使用内部映射来执行 IP 地址到地理区域的转换。Second, Traffic Manager uses an internal map to do the IP address to geographic region translation. 尽管此映射会经过不断验证和更新来提高其准确性和阐释 Internet 的演变,但是我们的信息仍有可能不能确切反应所有 IP 地址的地理位置。While this map is validated and updated on an ongoing basis to increase its accuracy and account for the evolving nature of the internet, there is still the possibility that our information is not an exact representation of the geographic location of all the IP addresses.

是否需将终结点与进行地理路由时用来进行配置的终结点置于同一区域?Does an endpoint need to be physically located in the same region as the one it is configured with for geographic routing?

否。终结点的位置不会限制可以向其映射哪些区域。No, the location of the endpoint imposes no restrictions on which regions can be mapped to it.

是否可以将地理区域分配给某个配置文件中的终结点,而该配置文件尚未进行地理路由所需的配置?Can I assign geographic regions to endpoints in a profile that is not configured to do geographic routing?

可以;如果某个配置文件的路由方法不是地理路由,则可使用 Azure 流量管理器 REST API 将地理区域分配给该配置文件中的终结点。Yes, if the routing method of a profile is not geographic, you can use the Azure Traffic Manager REST API to assign geographic regions to endpoints in that profile. 如果是非地理路由类型的配置文件,则会忽略该配置。In the case of non-geographic routing type profiles, this configuration is ignored. 如果在以后将此类配置文件更改为地理路由类型,流量管理器可以使用相应的映射。If you change such a profile to geographic routing type at a later time, Traffic Manager can use those mappings.

尝试将现有配置文件的路由方法更改为地理路由时,为何会出现错误?Why am I getting an error when I try to change the routing method of an existing profile to Geographic?

使用地理路由时,配置文件中的所有终结点都至少需要将一个区域映射到其中。All the endpoints under a profile with geographic routing need to have at least one region mapped to it. 要将现有配置文件转换为地理路由类型,首先需使用 Azure 流量管理器 REST API 将地理区域关联到所有终结点,此后再将路由类型更改为地理路由。To convert an existing profile to geographic routing type, you first need to associate geographic regions to all its endpoints using the Azure Traffic Manager REST API before changing the routing type to geographic. 如果使用门户,请先删除终结点,将配置文件的路由方法更改为地理路由,然后再添加终结点及其地理区域映射。If using portal, first delete the endpoints, change the routing method of the profile to geographic and then add the endpoints along with their geographic region mapping.

如果使用地理路由方法,则只能将一个区域分配给配置文件中的一个终结点。A region can be assigned to only one endpoint within a profile if it is using the geographic routing method. 如果该终结点不是带有子配置文件的嵌套类型,则当该终结点不正常时,流量管理器仍会继续向其发送流量,因为不发送流量也不会造成任何改善。If that endpoint is not a nested type with a child profile attached to it, if that endpoint going unhealthy, Traffic Manager continues to send traffic to it since the alternative of not sending any traffic isn't any better. 流量管理器不会故障转移到其他终结点,即使所分配的区域是分配给不正常终结点的区域的“父”区域。Traffic Manager does not failover to another endpoint, even when the region assigned is a "parent" of the region assigned to the endpoint that went unhealthy . 这样做是为了确保流量管理器遵守客户在其配置文件中设置的地理边界。This is done to ensure that Traffic Manager respects the geographic boundaries that a customer has setup in their profile. 为了确保在某个终结点不正常时能够故障转移到其他终结点,建议为地理区域分配包含多个终结点(而不是单个终结点)的嵌套式配置文件。To get the benefit of failing over to another endpoint when an endpoint goes unhealthy, it is recommended that geographic regions be assigned to nested profiles with multiple endpoints within it instead of individual endpoints. 这样一来,如果嵌套式子配置文件中的某个终结点故障,则可将流量故障转移到同一嵌套式子配置文件中的其他终结点。In this way, if an endpoint in the nested child profile fails, traffic can failover to another endpoint inside the same nested child profile.

对于支持此路由类型的 API 版本,是否存在任何限制?Are there any restrictions on the API version that supports this routing type?

是的。仅 API 2017-03-01 及更高版本支持地理路由类型。Yes, only API version 2017-03-01 and newer supports the Geographic routing type. 不能使用旧的 API 版本创建地理路由类型的配置文件或向终结点分配地理区域。Any older API versions cannot be used to created profiles of Geographic routing type or assign geographic regions to endpoints. 如果使用旧的 API 版本从 Azure 订阅检索配置文件,则不会返回任何地理路由类型的配置文件。If an older API version is used to retrieve profiles from an Azure subscription, any profile of Geographic routing type is not returned. 另外,在使用旧的 API 版本时,如果返回的配置文件的终结点进行了地理区域分配,则不会显示该地理区域分配。In addition, when using older API versions, any profile returned that has endpoints with a geographic region assignment, does not have its geographic region assignment shown.

流量管理器子网流量路由方法Traffic Manager Subnet traffic routing method

可以在哪些情况下使用子网路由?What are some use cases where subnet routing is useful?

针对按 DNS 请求 IP 地址的源 IP 标识的特定用户组,子网路由可以为其提供不同的体验。Subnet routing allows you to differentiate the experience you deliver for specific sets of users identified by the source IP of their DNS requests IP address. 如果用户从公司总部连接到网站,则会显示不同的内容。An example would be showing different content if users are connecting to a website from your corporate HQ. 另一种情况是限制来自某些 ISP 的用户,使其只能访问仅支持 IPv4 连接的终结点(针对在使用 IPv6 时性能不佳的 ISP)。Another would be restricting users from certain ISPs to only access endpoints that support only IPv4 connections if those ISPs have sub-par performance when IPv6 is used. 使用子网路由方法的另一个原因是其能与嵌套配置文件集中的其他配置文件配合使用。Another reason to use Subnet routing method is in conjunction with other profiles in a nested profile set. 例如,如果要使用地理路由方法对用户进行地域隔离,但想要对特定 ISP 使用不同的路由方法,则可以将具有子网路由方法的配置文件作为父级配置文件,并覆盖该 ISP 以使用特定的子级配置文件,并为其他所有人提供标准的地理配置文件。For example, if you want to use Geographic routing method for geo-fencing your users, but for a specific ISP you want to do a different routing method, you can have a profile withy Subnet routing method as the parent profile and override that ISP to use a specific child profile and have the standard Geographic profile for everyone else.

流量管理器如何获取最终用户的 IP 地址?How does Traffic Manager know the IP address of the end user?

最终用户设备通常使用 DNS 解析器来代表他们执行 DNS 查找。End user devices typically use a DNS resolver to do the DNS lookup on their behalf. 流量管理器将此类解析器的传出 IP 视为源 IP。The outgoing IP of such resolvers is what Traffic Manager sees as the source IP. 此外,子网路由方法还会查看是否存在随请求一起传递的 EDNS0 扩展客户端子网 (ECS) 信息。In addition, Subnet routing method also looks to see if there is EDNS0 Extended Client Subnet (ECS) information that was passed with the request. 如果存在 ECS 信息,则将该地址用于确定路由。If ECS information is present, that is the address used to determine the routing. 如果缺少 ECS 信息,则将查询的源 IP 用于路由。In the absence of ECS information, the source IP of the query is used for routing purposes.

使用子网路由时如何指定 IP 地址?How can I specify IP addresses when using Subnet routing?

可以通过两种方式指定与终结点相关联的 IP 地址。The IP addresses to associate with an endpoint can be specified in two ways. 首先,可以使用带有起始和结束地址的四分点十进制八位字节表示法来指定范围(例如,1.2.3.4-5.6.7.8 或 3.4.5.6-3.4.5.6)。First, you can use the quad dotted decimal octet notation with a start and end addresses to specify the range (for example, 1.2.3.4-5.6.7.8 or 3.4.5.6-3.4.5.6). 其次,可以使用 CIDR 表示法来指定范围(例如 1.2.3.0/24)。Second, you can use the CIDR notation to specify the range (for example, 1.2.3.0/24). 可以指定多个范围,并且可以在范围集中使用这两种表示法类型。You can specify multiple ranges and can use both notation types in a range set. 存在一些限制。A few restrictions apply.

  • 由于每个 IP 必须映射到单个终结点,因此地址范围不能重叠You cannot have overlap of address ranges since each IP needs to be mapped to only a single endpoint
  • 起始地址不能超过结束地址The start address cannot be more than the end address
  • 在 CIDR 表示法的情况下,“/”之前的 IP 地址应该是该范围的起始地址(例如 1.2.3.0/24 有效但 1.2.3.4.4/24 无效)In the case of the CIDR notation, the IP address before the '/' should be the start address of that range (for example, 1.2.3.0/24 is valid but 1.2.3.4.4/24 is NOT valid)

使用子网路由时如何指定回退终结点?How can I specify a fallback endpoint when using Subnet routing?

在具有子网路由的配置文件中,如果没有子网映射到某个终结点,则所有与其他终结点不匹配的请求都将定向到此终结点。In a profile with Subnet routing, if you have an endpoint with no subnets mapped to it, any request that does not match with other endpoints will be directed to here. 强烈建议在配置文件中配置这样一个回退终结点,因为如果请求进入并且未映射到任何终结点或者如果它映射到终结点但该终结点存在问题,流量管理器将返回 NXDOMAIN 响应。It is highly recommended that you have such a fallback endpoint in your profile since Traffic Manager will return a NXDOMAIN response if a request comes in and it is not mapped to any endpoints or if it is mapped to an endpoint but that endpoint is unhealthy.

如果在子网路由类型配置文件中禁用终结点会发生什么?What happens if an endpoint is disabled in a Subnet routing type profile?

在具有子网路由的配置文件中,如果终结点已禁用,则流量管理器会像该终结点及其子网映射不存在一样运行。In a profile with Subnet routing, if you have an endpoint with that is disabled, Traffic Manager will behave as if that endpoint and the subnet mappings it has does not exist. 如果收到与其 IP 地址映射匹配的查询且终结点已禁用,则流量管理器将返回回退终结点(没有映射的终结点),或者如果不存在回退终结点,将返回 NXDOMAIN 响应。If a query that would've matched with its IP address mapping is received and the endpoint is disabled, Traffic Manager will return a fallback endpoint (one with no mappings) or if such an endpoint is not present, will return a NXDOMAIN response.

流量管理器的多值流量路由方法Traffic Manager MultiValue traffic routing method

可以在哪些情况下使用多值路由?What are some use cases where MultiValue routing is useful?

多值路由在单个查询响应中返回多个运行正常的终结点。MultiValue routing returns multiple healthy endpoints in a single query response. 此方法的主要优势在于,如果某个终结点运行不正常,则客户端有多个选项可以进行重试,而无需另外进行 DNS 调用(这样做可能会从上游缓存返回相同的值)。The main advantage of this is that, if an endpoint is unhealthy, the client has more options to retry without making another DNS call (which might return the same value from an upstream cache). 这适用于希望最大程度地减少停机时间、对可用性敏感的应用程序。This is applicable for availability sensitive applications that want to minimize the downtime. 另一种可以使用多值路由方法的情况是:终结点“双归属”于 IPv4 和 IPv6 地址,且你想在调用方启动与该终结点的连接时为其提供这两个选项。Another use for MultiValue routing method is if an endpoint is "dual-homed" to both IPv4 and IPv6 addresses and you want to give the caller both options to choose from when it initiates a connection to the endpoint.

使用多值路由会返回多少终结点?How many endpoints are returned when MultiValue routing is used?

可以指定返回的最大终结点数,当收到查询时,多值路由将返回不超过该指定数量的正常运行的终结点。You can specify the maximum number of endpoints to be returned and MultiValue will return no more than that many healthy endpoints when a query is received. 此配置的最大值为 10。The maximum possible value for this configuration is 10.

使用多值路由时,会收到一组相同的终结点吗?Will I get the same set of endpoints when MultiValue routing is used?

我们无法保证在每个查询中都会返回相同的一组终结点。We cannot guarantee that the same set of endpoints will be returned in each query. 此结果也受终结点的运行状况影响,在响应中不包括某些终结点时,说明它们可能存在问题This is also affected by the fact that some of the endpoints might go unhealthy at which point they will not be included in the response

流量管理器终结点Traffic Manager endpoints

能否将流量管理器用于多个订阅的终结点?Can I use Traffic Manager with endpoints from multiple subscriptions?

不能对 Azure Web 应用使用多个订阅中的终结点。Using endpoints from multiple subscriptions is not possible with Azure Web Apps. Web 应用要求其所用的任何自定义域名只能在单个订阅中使用。Azure Web Apps requires that any custom domain name used with Web Apps is only used within a single subscription. 无法对多个订阅中的 Web 应用使用同一个域名。It is not possible to use Web Apps from multiple subscriptions with the same domain name.

对于其他终结点类型,可在多个订阅中结合使用流量管理器和终结点。For other endpoint types, it is possible to use Traffic Manager with endpoints from more than one subscription. 在 Resource Manager 中,只要配置流量管理器配置文件的人员具有终结点的读取访问权限,任何订阅的终结点就都可添加到流量管理器中。In Resource Manager, endpoints from any subscription can be added to Traffic Manager, as long as the person configuring the Traffic Manager profile has read access to the endpoint. 可使用 Azure Resource Manager 基于角色的访问控制 (RBAC) 授予这些权限。These permissions can be granted using Azure Resource Manager role-based access control (RBAC).

能否将流量管理器用于云服务的“过渡”槽?Can I use Traffic Manager with Cloud Service 'Staging' slots?

是的。Yes. 可以在流量管理器中将云服务的“过渡”槽配置为“外部”终结点。Cloud Service 'staging' slots can be configured in Traffic Manager as External endpoints. 运行状况检查仍按 Azure 终结点费率计费。Health checks are still be charged at the Azure Endpoints rate. 由于使用的是“外部”终结点类型,系统不会自动拾取对基础服务所做的更改。Because the External endpoint type is in use, changes to the underlying service are not picked up automatically. 使用外部终结点时,流量管理器无法检测停止或删除云服务的时间。With external endpoints, Traffic Manager cannot detect when the Cloud Service is stopped or deleted. 因此,在禁用或删除终结点之前,流量管理器会一直对运行状况检查计费。Therefore, the Traffic Manager continues billing for health checks until the endpoint is disabled or deleted.

流量管理器是否支持 IPv6 终结点?Does Traffic Manager support IPv6 endpoints?

流量管理器当前不提供 IPv6 可寻址的名称服务器。Traffic Manager does not currently provide IPv6-addressable name servers. 但是,IPv6 客户端仍可使用流量管理器连接到 IPv6 终结点。However, Traffic Manager can still be used by IPv6 clients connecting to IPv6 endpoints. 客户端不会直接向流量管理器发出 DNS 请求,A client does not make DNS requests directly to Traffic Manager. 而是使用递归 DNS 服务。Instead, the client uses a recursive DNS service. 仅使用 IPv6 的客户端通过 IPv6 向递归 DNS 服务发送请求。An IPv6-only client sends requests to the recursive DNS service via IPv6. 然后,该递归服务应该能够使用 IPv4 联系流量管理器名称服务器。Then the recursive service should be able to contact the Traffic Manager name servers using IPv4.

流量管理器使用终结点的 DNS 名称或 IP 地址做出响应。Traffic Manager responds with the DNS name or IP address of the endpoint. 要支持 IPv6 终结点,有两个选择。To support an IPv6 endpoint, there are two options. 可将终结点添加为与 AAAA 记录相关联的 DNS 名称,流量管理器将对该终结点进行运行状况检查,并会在查询响应中将其作为 CNAME 记录类型返回。You can add the endpoint as a DNS name that has an associated AAAA record and Traffic Manager will health check that endpoint and return it as a CNAME record type in the query response. 还可以使用 IPv6 地址直接添加该终结点,流量管理器将在查询响应中返回 AAAA 类型记录。You can also add that endpoint directly using the IPv6 address and Traffic Manager will return a AAAA type record in the query response.

流量管理器是否可用于同一区域中的多个 Web 应用?Can I use Traffic Manager with more than one Web App in the same region?

通常情况下,流量管理器用于将流量引导到部署在不同区域中的应用程序。Typically, Traffic Manager is used to direct traffic to applications deployed in different regions. 不过,流量管理器也可用于一个应用程序在同一区域中存在多个部署的情形。However, it can also be used where an application has more than one deployment in the same region. 流量管理器 Azure 终结点不允许将同一 Azure 区域中的多个 Web 应用终结点添加到同一流量管理器配置文件。The Traffic Manager Azure endpoints do not permit more than one Web App endpoint from the same Azure region to be added to the same Traffic Manager profile.

如何将流量管理器配置文件的 Azure 终结点移动到其他资源组?How do I move my Traffic Manager profile's Azure endpoints to a different resource group?

与流量管理器配置文件关联的 Azure 终结点使用其资源 ID 进行跟踪。Azure endpoints that are associated with a Traffic Manager profile are tracked using their resource IDs. 如果 Azure 资源作为终结点(例如公共 IP、经典云服务、WebApp 或以嵌套方式使用的另一流量管理器配置文件)使用,当其移动到其他资源组时,Azure 资源的 ID 会发生更改。When an Azure resource that is being used as an endpoint (for example, Public IP, Classic Cloud Service, WebApp, or another Traffic Manager profile used in a nested manner) is moved to a different resource group, its resource ID changes. 对于这种情况,目前必须删除流量管理器配置文件,方法是先删除这些终结点,然后再将其添加回配置文件。In this scenario, currently, you must update the Traffic Manager profile by first deleting and then adding back the endpoints to the profile.

流量管理器终结点监视Traffic Manager endpoint monitoring

流量管理器能否灵活应对 Azure 区域故障?Is Traffic Manager resilient to Azure region failures?

流量管理器是在 Azure 中提供高可用性应用程序的关键组件。Traffic Manager is a key component of the delivery of highly available applications in Azure. 若要提供高可用性,流量管理器必须具有超高的可用性,并且能够灵活应对区域故障。To deliver high availability, Traffic Manager must have an exceptionally high level of availability and be resilient to regional failure.

在设计上,流量管理器组件能够灵活应对任何 Azure 区域的全面故障。By design, Traffic Manager components are resilient to a complete failure of any Azure region. 这样的应对能力见于所有流量管理器组件:DNS 名称服务器、API、存储层、终结点监视服务。This resilience applies to all Traffic Manager components: the DNS name servers, the API, the storage layer, and the endpoint monitoring service.

在整个 Azure 区域发生服务中断的情况下(这种情况很少见),流量管理器仍可继续正常运行。In the unlikely event of an outage of an entire Azure region, Traffic Manager is expected to continue to function normally. 在多个 Azure 区域中部署的应用程序可以依赖流量管理器将流量定向到这些区域中的可用应用程序实例。Applications deployed in multiple Azure regions can rely on Traffic Manager to direct traffic to an available instance of their application.

选择资源组位置会如何影响流量管理器?How does the choice of resource group location affect Traffic Manager?

流量管理器属于单一的全局性服务,Traffic Manager is a single, global service. 而不是区域性服务。It is not regional. 选择资源组位置对部署在该资源组中的流量管理器配置文件没有影响。The choice of resource group location makes no difference to Traffic Manager profiles deployed in that resource group.

Azure Resource Manager 要求所有资源组指定一个位置,这决定了部署在该资源组中的资源的默认位置。Azure Resource Manager requires all resource groups to specify a location, which determines the default location for resources deployed in that resource group. 创建流量管理器配置文件时,会在资源组中创建该配置文件。When you create a Traffic Manager profile, it is created in a resource group. 所有流量管理器配置文件使用“全局”作为位置,覆盖资源组的默认值。All Traffic Manager profiles use global as their location, overriding the resource group default.

如何确定每个终结点的当前运行状况?How do I determine the current health of each endpoint?

除了总体配置文件,每个终结点的当前监视状态也显示在 Azure 门户中。The current monitoring status of each endpoint, in addition to the overall profile, is displayed in the Azure portal. 此信息也可通过流量监视器 REST APIPowerShell cmdlet跨平台 Azure CLI 获取。This information also is available via the Traffic Monitor REST API, PowerShell cmdlets, and cross-platform Azure CLI.

可以使用 Azure Monitor 来跟踪终结点的运行状况,并查看其可视表示形式。You can also use Azure Monitor to track the health of your endpoints and see a visual representation of them. 有关使用 Azure Monitor 的详细信息,请参阅 Azure 监视文档For more about using Azure Monitor, see the Azure Monitoring documentation.

能否监视 HTTPS 终结点?Can I monitor HTTPS endpoints?

是的。Yes. 流量管理器支持通过 HTTPS 进行探测。Traffic Manager supports probing over HTTPS. 在监视配置中将 HTTPS 配置为协议。Configure HTTPS as the protocol in the monitoring configuration.

流量管理器无法提供任何证书验证,包括:Traffic manager cannot provide any certificate validation, including:

  • 不验证服务器端证书Server-side certificates are not validated
  • 不验证 SNI 服务器端证书SNI server-side certificates are not validated
  • 不支持客户端证书Client certificates are not supported

添加终结点时是否使用 IP 地址或 DNS 名称?Do I use an IP address or a DNS name when adding an endpoint?

流量管理器支持使用三种方式添加终结点:DNS 名称、IPv4 地址和 IPv6 地址。Traffic Manager supports adding endpoints using three ways to refer them - as a DNS name, as an IPv4 address and as an IPv6 address. 如果将终结点添加为 IPv4 或 IPv6 地址,查询响应将分别为记录类型 A 或 AAAA。If the endpoint is added as an IPv4 or IPv6 address the query response will be of record type A or AAAA, respectively. 如果终结点已添加为 DNS 名称,则查询响应将为记录类型 CNAME。If the endpoint was added as a DNS name, then the query response will be of record type CNAME. 仅在终结点的类型为“外部”时,才允许将终结点添加为 IPv4 或 IPv6 地址。 Adding endpoints as IPv4 or IPv6 address is permitted only if the endpoint is of type External. 三种终结点寻址类型支持所有路由方法和监视设置。All routing methods and monitoring settings are supported by the three endpoint addressing types.

添加终结点时可以使用哪些类型的 IP 地址?What types of IP addresses can I use when adding an endpoint?

流量管理器可使用 IPv4 或 IPv6 地址指定终结点。Traffic Manager allows you to use IPv4 or IPv6 addresses to specify endpoints. 下面列出了一些限制:There are a few restrictions which are listed below:

  • 不允许使用与保留的私有网络 IP 地址空间对应的地址。Addresses that correspond to reserved private IP address spaces are not allowed. 其中包括 RFC 1918、RFC 6890、RFC 5737、RFC 3068、RFC 2544 和 RFC 5771 中包括地址These addresses include those called out in RFC 1918, RFC 6890, RFC 5737, RFC 3068, RFC 2544 and RFC 5771
  • 地址不能包含任何端口号(可在配置文件配置设置中指定要使用的端口)The address must not contain any port numbers (you can specify the ports to be used in the profile configuration settings)
  • 同一配置文件中的两个终结点不能具有相同的目标 IP 地址No two endpoints in the same profile can have the same target IP address

可以在单个配置文件中使用不同的终结点寻址类型吗?Can I use different endpoint addressing types within a single profile?

不能,流量管理器不允许在单个配置文件中混合使用不同的终结点寻址类型(多值路由类型的配置文件除外,可在其中混合使用 IPv4 和 IPv6 寻址类型)No, Traffic Manager does not allow you to mix endpoint addressing types within a profile, except for the case of a profile with MultiValue routing type where you can mix IPv4 and IPv6 addressing types

当传入查询的记录类型与与终结点寻址类型关联的记录类型不同时,会出现什么情况?What happens when an incoming query's record type is different from the record type associated with the addressing type of the endpoints?

当收到针对配置文件的查询时,流量管理器首先会根据指定的路由方法和终结点的运行状况查找需要返回的终结点。When a query is received against a profile, Traffic Manager first finds the endpoint that needs to be returned as per the routing method specified and the health status of the endpoints. 然后,在根据下表返回响应之前,它会查看传入查询中请求的记录类型以及与终结点关联的记录类型。It then looks at the record type requested in the incoming query and the record type associated with the endpoint before returning a response based on the table below.

对于使用多值路由以外的任何路由方法的配置文件:For profiles with any routing method other than MultiValue:

传入的查询请求Incoming query request 终结点类型Endpoint type 提供的响应Response Provided
任意ANY A/AAAA/CNAMEA / AAAA / CNAME 目标终结点Target Endpoint
AA A/CNAMEA / CNAME 目标终结点Target Endpoint
AA AAAAAAAA 无数据NODATA
AAAAAAAA AAAA/CNAMEAAAA / CNAME 目标终结点Target Endpoint
AAAAAAAA AA 无数据NODATA
CNAMECNAME CNAMECNAME 目标终结点Target Endpoint
CNAMECNAME A/AAAAA / AAAA 无数据NODATA

对于将路由方法设置为多值路由的配置文件:For profiles with routing method set to MultiValue:

传入的查询请求Incoming query request 终结点类型Endpoint type 提供的响应Response Provided
任意ANY 混合 A 和 AAAAMix of A and AAAA 目标终结点Target Endpoints
AA 混合 A 和 AAAAMix of A and AAAA 仅 A 类型的目标终结点Only Target Endpoints of type A
AAAAAAAA 混合 A 和 AAAAMix of A and AAAA 仅 AAAA 类型的目标终结点Only Target Endpoints of type AAAA
CNAMECNAME 混合 A 和 AAAAMix of A and AAAA 无数据NODATA

可以在嵌套配置文件中使用终结点采用 IPv4/IPv6 地址的配置文件吗?Can I use a profile with IPv4 / IPv6 addressed endpoints in a nested profile?

可以,有一种例外情况:多值类型的配置文件无法成为嵌套配置文件中的父级配置文件。Yes, you can with the exception that a profile of type MultiValue cannot be a parent profile in a nested profile set.

我在流量管理器配置文件中停止了 Azure 云服务/Web 应用程序终结点,但即使重启,也仍未收到任何流量。I stopped an Azure cloud service / web application endpoint in my Traffic Manager profile but I am not receiving any traffic even after I restarted it. 如何解决此问题?How can I fix this?

当 Azure 云服务/Web 应用程序终结点停止时,流量管理器会停止检查其运行状况,仅当检测到终结点已重启时,才重新开始运行状况检查。When an Azure cloud service / web application endpoint is stopped Traffic Manager stops checking its health and restarts the health checks only after it detects that the endpoint has restarted. 若要防止这种延迟,请在流量管理器配置文件中禁用该终结点,然后在重启该终结点后将其重新启用。To prevent this delay, disable and then reenable that endpoint in the Traffic Manager profile after you restart the endpoint.

是否即使应用程序不支持 HTTP 或 HTTPS,我也可以使用流量管理器?Can I use Traffic Manager even if my application does not have support for HTTP or HTTPS?

是的。Yes. 可将 TCP 指定为监视协议,而流量管理器可以发起 TCP 连接,并等待终结点的响应。You can specify TCP as the monitoring protocol and Traffic Manager can initiate a TCP connection and wait for a response from the endpoint. 如果终结点在超时期限内回复了连接请求并提供了用于建立连接的响应,则会将终结点标记为正常。If the endpoint replies to the connection request with a response to establish the connection, within the timeout period, then that endpoint is marked as healthy.

使用 TCP 监视时,需要终结点发出的哪些特定响应?What specific responses are required from the endpoint when using TCP monitoring?

使用 TCP 监视时,流量管理器将通过在指定的端口上向终结点发送 SYN 请求来启动三次 TCP 握手。When TCP monitoring is used, Traffic Manager starts a three-way TCP handshake by sending a SYN request to endpoint at the specified port. 然后,它会等待一段时间(在超时设置中指定),让终结点发出的响应。It then waits for a period of time (as specified in the timeout settings) for a response from the endpoint. 如果终结点在监视设置中指定的超时期限内响应了 SYN 请求并提供了 SYN-ACK 响应,则将终结点视为正常。If the endpoint responds to the SYN request with a SYN-ACK response within the timeout period specified in the monitoring settings, then that endpoint is considered healthy. 如果收到 SYN-ACK 响应,流量管理器将通过发回包含 RST 的响应来重置连接。If the SYN-ACK response is received, the Traffic Manager resets the connection by responding back with a RST.

流量管理器将用户从不正常终结点中移出的速度有多快?How fast does Traffic Manager move my users away from an unhealthy endpoint?

流量管理器提供多个设置,可帮助控制流量管理器配置文件的故障转移行为,如下所述:Traffic Manager provides multiple settings that can help you to control the failover behavior of your Traffic Manager profile as follows:

  • 可以通过将“探测间隔”设置为 10 秒,指定流量管理器要更频繁地探测终结点。you can specify that the Traffic Manager probes the endpoints more frequently by setting the Probing Interval at 10 seconds. 这可确保尽快检测到任何即将进入不正常状态的终结点。This ensures that any endpoint going unhealthy can be detected as soon as possible.
  • 可以指定在经过多长时间后,运行状况检查请求超时(最小超时值为 5 秒)。you can specify how long to wait before a health check request times out (minimum time out value is 5 sec).
  • 可以指定在发生多少次失败之后,将终结点标记为不正常。you can specify how many failures can occur before the endpoint is marked as unhealthy. 此值最小为 0,在这种情况下,一旦终结点通不过第一次运行状况检查,就会将它标记为不正常。This value can be low as 0, in which case the endpoint is marked unhealthy as soon as it fails the first health check. 但是,对容许失败次数使用最小值 0 可能会因为探测时发生的任何暂时性问题,而从轮换项目中取出终结点。However, using the minimum value of 0 for the tolerated number of failures can lead to endpoints being taken out of rotation due to any transient issues that may occur at the time of probing.
  • 可将 DNS 响应的生存时间 (TTL) 最小指定为 0。you can specify the time-to-live (TTL) for the DNS response to be as low as 0. 这样做意味着 DNS 解析程序无法缓存响应,并且每个新查询将获取包含流量管理器中最新运行状况信息的响应。Doing so means that DNS resolvers cannot cache the response and each new query gets a response that incorporates the most up-to-date health information that the Traffic Manager has.

如果使用这些设置,流量管理器可在终结点进入不正常状态后的 10 秒内提供故障转移,并针对相应的配置文件发出 DNS 查询。By using these settings, Traffic Manager can provide failovers under 10 seconds after an endpoint goes unhealthy and a DNS query is made against the corresponding profile.

如何在配置文件中为不同的终结点指定不同的监视设置?How can I specify different monitoring settings for different endpoints in a profile?

流量管理器监视设置在配置文件级别指定。Traffic Manager monitoring settings are at a per profile level. 如果只需对一个终结点使用不同的监视设置,可以使用嵌套配置文件的形式配置该终结点,这样,其监视设置就会不同于父配置文件。If you need to use a different monitoring setting for only one endpoint, it can be done by having that endpoint as a nested profile whose monitoring settings are different from the parent profile.

如何将 HTTP 标头分配给终结点的流量管理器运行状况检查?How can I assign HTTP headers to the Traffic Manager health checks to my endpoints?

可以在流量管理器对终结点启动的 HTTP(S) 运行状况检查中指定自定义标头。Traffic Manager allows you to specify custom headers in the HTTP(S) health checks it initiates to your endpoints. 若要指定自定义标头,可在配置文件级别(适用于所有终结点)指定,也可在终结点级别指定。If you want to specify a custom header, you can do that at the profile level (applicable to all endpoints) or specify it at the endpoint level. 如果在两个级别定义了标头,则在终结点级别指定的标头将覆盖在配置文件级别指定的标头。If a header is defined at both levels, then the one specified at the endpoint level will override the profile level one. 一个常见的用例是指定主机头,以便流量管理器请求可以正确地路由到多租户环境中托管的终结点。One common use case for this is specifying host headers so that Traffic Manager requests may get routed correctly to an endpoint hosted in a multi-tenant environment. 另一个用例是从终结点的 HTTP(S) 请求日志中识别流量管理器请求Another use case of this is to identify Traffic Manager requests from an endpoint's HTTP(S) request logs

终结点运行状况检查使用什么主机头?What host header do endpoint health checks use?

如果未提供自定义主机头设置,流量管理器使用的主机头则为配置文件中配置的终结点目标的 DNS 名称(如果可用)。If no custom host header setting is provided, the host header used by Traffic Manager is the DNS name of the endpoint target configured in the profile, if that is available.

流量管理器预期会对终结点执行多少次运行状况检查?How many health checks to my endpoint can I expect from Traffic Manager?

对终结点执行的流量管理器运行状况检查次数取决于以下因素:The number of Traffic Manager health checks reaching your endpoint depends on the following:

  • 为监视间隔设置的值(间隔越小,则在任意给定时间进入终结点的请求就越多)。the value that you have set for the monitoring interval (smaller interval means more requests landing on your endpoint in any given time period).
  • 运行状况检查的来源位置数(前面的“常见问题解答”中列出了这些检查的预期来源 IP 地址)。the number of locations from where the health checks originate (the IP addresses from where you can expect these checks is listed in the preceding FAQ).

流量管理器嵌套式配置文件Traffic Manager nested profiles

如何配置嵌套式配置文件?How do I configure nested profiles?

可以使用 Azure 资源管理器、经典 Azure REST API、Azure PowerShell cmdlet 和跨平台 Azure CLI 命令配置嵌套式流量管理器配置文件。Nested Traffic Manager profiles can be configured using both the Azure Resource Manager and the classic Azure REST APIs, Azure PowerShell cmdlets and cross-platform Azure CLI commands. 也支持通过新 Azure 门户配置这些配置文件。They are also supported via the new Azure portal.

流量管理器支持多少层嵌套?How many layers of nesting does Traffic Manger support?

配置文件的嵌套最深可达 10 层。You can nest profiles up to 10 levels deep. 不允许使用“循环”。'Loops' are not permitted.

能否在同一流量管理器配置文件中将其他终结点类型与嵌套式子配置文件混合在一起使用?Can I mix other endpoint types with nested child profiles, in the same Traffic Manager profile?

是的。Yes. 至于如何在一个配置文件中组合使用不同类型的终结点,并无任何限制。There are no restrictions on how you combine endpoints of different types within a profile.

嵌套式配置文件如何应用计费模型?How does the billing model apply for Nested profiles?

使用嵌套式配置文件在价格方面不会给你带来负面影响。There is no negative pricing impact of using nested profiles.

流量管理器计费分两部分:终结点运行状况检查以及数百万的 DNS 查询Traffic Manager billing has two components: endpoint health checks and millions of DNS queries

  • 终结点运行状况检查:在父配置文件中将子配置文件配置为终结点时,不对子配置文件收费。Endpoint health checks: There is no charge for a child profile when configured as an endpoint in a parent profile. 在子配置文件中监视终结点按正常方式计费。Monitoring of the endpoints in the child profile is billed in the usual way.
  • DNS 查询:每个查询仅统计一次。DNS queries: Each query is only counted once. 对父配置文件执行查询时,如果返回了子配置文件中的终结点,则仅统计父配置文件。A query against a parent profile that returns an endpoint from a child profile is counted against the parent profile only.

如需完整的详细信息,请参阅流量管理器定价页For full details, see the Traffic Manager pricing page.

嵌套式配置文件是否会造成性能影响?Is there a performance impact for nested profiles?

否。No. 使用嵌套式配置文件不会造成性能影响。There is no performance impact incurred when using nested profiles.

在处理每个 DNS 查询时,流量管理器名称服务器会在内部遍历配置文件层次结构。The Traffic Manager name servers traverse the profile hierarchy internally when processing each DNS query. 对父配置文件执行 DNS 查询可能会收到终结点来自子配置文件的 DNS 响应。A DNS query to a parent profile can receive a DNS response with an endpoint from a child profile. 不管使用的是单个配置文件还是嵌套式配置文件,都只使用一条 CNAME 记录。A single CNAME record is used whether you are using a single profile or nested profiles. 不需要在层次结构中为每个配置文件创建一条 CNAME 记录。There is no need to create a CNAME record for each profile in the hierarchy.

在父配置文件中,流量管理器如何计算嵌套式终结点的运行状况?How does Traffic Manager compute the health of a nested endpoint in a parent profile?

父配置文件不会针对子配置文件直接执行运行状况检查。The parent profile doesn't perform health checks on the child directly. 子配置文件的终结点运行状况用于计算子配置文件的总体运行状况。Instead, the health of the child profile's endpoints are used to calculate the overall health of the child profile. 此信息在嵌套式配置文件层次结构中向上传播,确定嵌套式终结点的运行状况。This information is propagated up the nested profile hierarchy to determine the health of the nested endpoint. 父配置文件使用此聚合运行状况信息确定是否可将流量定向到子配置文件。The parent profile uses this aggregated health to determine whether the traffic can be directed to the child.

下表描述了针对嵌套式终结点执行的流量管理器运行状况检查的行为。The following table describes the behavior of Traffic Manager health checks for a nested endpoint.

子配置文件监视器状态Child Profile Monitor status 父级终结点监视器状态Parent Endpoint Monitor status 注释Notes
已禁用。Disabled. 子配置文件已禁用。The child profile has been disabled. 已停止Stopped 父级终结点状态为“已停止”,而不是“已禁用”。The parent endpoint state is Stopped, not Disabled. “已禁用”状态保留用于指示已在父配置文件中禁用了终结点。The Disabled state is reserved for indicating that you have disabled the endpoint in the parent profile.
已降级。Degraded. 至少一个子配置文件终结点处于“已降级”状态。At least one child profile endpoint is in a Degraded state. 联机:子配置文件中处于“联机”状态的终结点的数目至少是 MinChildEndpoints 的值。Online: the number of Online endpoints in the child profile is at least the value of MinChildEndpoints.
正在检查终结点:子配置文件中处于“联机”和“正在检查终结点”状态的终结点的数目至少是 MinChildEndpoints 的值。CheckingEndpoint: the number of Online plus CheckingEndpoint endpoints in the child profile is at least the value of MinChildEndpoints.
已降级:其他。Degraded: otherwise.
流量路由到状态为“正在检查终结点”的终结点。Traffic is routed to an endpoint of status CheckingEndpoint. 如果将 MinChildEndpoints 设置得过高,终结点将始终处于降级状态。If MinChildEndpoints is set too high, the endpoint is always degraded.
联机。Online. 至少一个子配置文件终结点处于“联机”状态。At least one child profile endpoint is an Online state. 没有任何终结点处于“已降级”状态。No endpoint is in the Degraded state. 见上。See above.
正在检查终结点。CheckingEndpoints. 至少一个子配置文件终结点处于“正在检查终结点”状态。At least one child profile endpoint is 'CheckingEndpoint'. 没有任何终结点处于“联机”或“已降级”状态No endpoints are 'Online' or 'Degraded' 同上。Same as above.
非活动。Inactive. 所有子配置文件终结点都处于“Disabled”或“Stopped”状态,除非这是没有终结点的配置文件。All child profile endpoints are either Disabled or Stopped, or this profile has no endpoints. 已停止Stopped

后续步骤:Next steps: