在流量管理器中配置加权流量路由方法Configure the weighted traffic routing method in Traffic Manager

一种常见的流量路由方法模式是提供一组相同的终结点(包括云服务和网站),并均匀地向每个终结点发送流量。A common traffic routing method pattern is to provide a set of identical endpoints, which include cloud services and websites, and send traffic to each equally. 以下步骤概述如何配置这种类型的流量路由方法。The following steps outline how to configure this type of traffic routing method.

Note

Azure Web 应用已经为 Azure 区域内的网站(可能包含多个数据中心)提供了循环负载均衡功能。Azure Web App already provides round-robin load balancing functionality for websites within an Azure Region (which may comprise multiple datacenters). 流量管理器允许你在不同数据中心的网站之间分配流量。Traffic Manager allows you to distribute traffic across websites in different datacenters.

配置加权流量路由方法To configure the weighted 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 Weighted. 如果不是,请在下拉列表中单击“加权” 。If it is not, click Weighted 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. 按如下方式测试配置更改: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 each endpoint in a round-robin fashion.
  6. 流量管理器配置文件正常工作后,请在权威 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