在流量管理器中配置优先级流量路由方法Configure priority traffic routing method in Traffic Manager

无论网站模式如何,Azure 网站都已针对数据中心(也称为区域)内的网站提供了故障转移功能。Regardless of the website mode, Azure Websites already provide failover functionality for websites within a datacenter (also known as a region). 流量管理器为不同的数据中心内的网站提供故障转移。Traffic Manager provides failover for websites in different datacenters.

服务故障转移的常见模式是将流量发送到主服务,并提供一组相同的备份服务进行故障转移。A common pattern for service failover is to send traffic to a primary service and provide a set of identical backup services for failover. 以下步骤说明如何对 Azure 云服务和网站配置这种具有优先顺序的故障转移:The following steps explain how to configure this prioritized failover with Azure cloud services and websites:

配置优先级流量路由方法To configure the priority traffic routing method

  1. 在浏览器中,登录 Azure 门户From a browser, sign in to the Azure portal. 如果还没有帐户,可注册 1 个月期限的试用版If you don't already have an account, you can sign up for a one-month trial.

  2. 在门户的搜索栏中,搜索“流量管理器配置文件” ,并单击要为其配置路由方法的配置文件名称。In the portal's search bar, search for the Traffic Manager profiles and then click the profile name that you want to configure the routing method for.

  3. 在“流量管理器配置文件” 边栏选项卡中,检查要包含在配置中的云服务和网站是否都存在。In the Traffic Manager profile blade, verify that both the cloud services and websites that you want to include in your configuration are present.

  4. 在“设置” 部分,单击“配置” ,并在“配置” 边栏选项卡中完成如下操作:In the Settings section, click Configuration, and in the Configuration blade, complete as follows:

    1. 对于“流量路由方法设置” ,验证流量路由方法是否是“优先级” 。For traffic routing method settings, verify that the traffic routing method is Priority. 如果不是,请在下拉列表中单击“优先级” 。If it is not, click Priority from the dropdown list.
    2. 为此配置文件中的所有终结点设置相同的“终结点监视器设置” ,如下所示:Set the Endpoint monitor settings identical for all every endpoint within this profile as follows:
      1. 选择相应的“协议” ,并指定“端口” 号。Select the appropriate Protocol, and specify the Port number.
      2. 对于“路径” ,请键入正斜杠 /For Path type a forward slash /. 若要监视终结点,必须指定路径和文件名。To monitor endpoints, you must specify a path and filename. 正斜杠“/”是有效的相对路径条目,表示文件位于根目录(默认位置)中。A forward slash "/" is a valid entry for the relative path and implies that the file is in the root directory (default).
      3. 在页面顶部,单击“保存” 。At the top of the page, click Save.
  5. 在“设置” 部分,单击“终结点” 。In the Settings section, click Endpoints.

  6. 在“终结点” 边栏选项卡中,查看终结点的优先级顺序。In the Endpoints blade, review the priority order for your endpoints. 如果选择了“优先级” 流量路由方法,则所选终结点的顺序很重要。When you select the Priority traffic routing method, the order of the selected endpoints matters. 验证终结点的优先级顺序。Verify the priority order of endpoints. 主终结点位于顶部。The primary endpoint is on top. 请仔细检查显示的顺序。Double-check on the order it is displayed. 所有请求均会路由到第一个终结点;如果流量管理器检测到其处于不正常状态,则流量会自动故障转移到下一终结点。all requests will be routed to the first endpoint and if Traffic Manager detects it be unhealthy, the traffic automatically fails over to the next endpoint.

  7. 如果要更改终结点优先级顺序,请单击该终结点,并在显示的“终结点” 边栏选项卡中,单击“编辑” 并根据需要更改“优先级” 值。To change the endpoint priority order, click the endpoint, and in the Endpoint blade that is displayed, click Edit and change the Priority value as needed.

  8. 单击“保存” 以保存更改的终结点设置。Click Save to save change the endpoint settings.

  9. 完成配置更改后,单击页面底部的“保存” 。After you complete your configuration changes, click Save at the bottom of the page.

  10. 按如下方式测试配置更改:Test the changes in your configuration as follows:

    1. 在门户的搜索栏中,搜索流量管理器配置文件名称,并在显示的结果中单击该流量管理器配置文件。In the portal's search bar, search for the Traffic Manager profile name and click the Traffic Manager profile in the results that the displayed.
    2. 在“流量管理器配置文件” 边栏选项卡中,单击“概述” 。In the Traffic Manager profile blade, click Overview.
    3. “流量管理器配置文件” 边栏选项卡会显示新建的流量管理器配置文件的 DNS 名称。The Traffic Manager profile blade displays the DNS name of your newly created Traffic Manager profile. 任意客户端(例如通过 Web 浏览器导航到此名称)均可使用此名称路由到根据路由类型确定的相应终结点。This can be used by any clients (for example, by navigating to it using a web browser) to get routed to the right endpoint as determined by the routing type. 此情况下,所有请求均会路由到第一个终结点;如果流量管理器检测到其处于不正常状态,则流量会自动故障转移到下一终结点。In this case all requests are routed to the first endpoint and if Traffic Manager detects it be unhealthy, the traffic automatically fails over to the next endpoint.
  11. 流量管理器配置文件正常工作后,请在权威 DNS 服务器上编辑 DNS 记录,将公司域名指向流量管理器域名。Once your Traffic Manager profile is working, edit the DNS record on your authoritative DNS server to point your company domain name to the Traffic Manager domain name.

    使用流量管理器配置优先级流量路由方法

后续步骤Next steps